Re: s/pattern/replacement/

2001-11-09 Thread Jeff 'japhy' Pinyan
On Nov 8, Kai Gollan said: >The message after using my skript is "4294967294" but this is not what I Heh, I got that happening once. It was because I was trying to tidy up my code and line up all the = signs. > $datei = ~ s/$pattern/$replacement/ ; Two things. F

Re: s/pattern/replacement/

2001-11-09 Thread Andrea Holstein
; > open ( FILE, 'transa33' ) || die " can“t open file: $!"; > while ( ) { # the g-modifier guarants you, that all patterns are substituted. > s/$pattern/$replacement/g; > print; > } > close FILE; > That should do what you want.

Re: s/pattern/replacement/

2001-11-09 Thread Jonathan E. Paton
Hi, If you are using Unix, for a one off operation you should be using the sed program... like this: sed s/pattern/replacement/g It takes standard in, and puts its output on standard out. I normally use it like: cat FILE | sed s/pattern/replacement/g > OUTPUT However, the perl solution

s/pattern/replacement/

2001-11-09 Thread Kai Gollan
Hi everybody! I am quiet new in Perl and I got a problem with with the operator s/pattern/replacement: My intention is to open a file, search for the pattern "DT" und replace the pattern with "SomethingElse"! The message after using my skript is "4294967294" but t