T
Troll
Hi,
I posted this in one of the other grps but have had no real luck yet. Sorry.
I need 2b able to change the contents of a file, ie. to substitute
occurences of 'one' to 'two'.
I have something like:
**************************
sub replace {
s/one/two/g;
}
open (INFILE, "+<test.txt") || etc...
while (<>) {
replace ();
}
**************************
Contents of test.txt are:
hello one
one ten one ten
What am I missing to make this work? I'd love to read the manual [like
someone has suggested] but by the time I get there it'll be next year...
Thanks in advance.
I posted this in one of the other grps but have had no real luck yet. Sorry.
I need 2b able to change the contents of a file, ie. to substitute
occurences of 'one' to 'two'.
I have something like:
**************************
sub replace {
s/one/two/g;
}
open (INFILE, "+<test.txt") || etc...
while (<>) {
replace ();
}
**************************
Contents of test.txt are:
hello one
one ten one ten
What am I missing to make this work? I'd love to read the manual [like
someone has suggested] but by the time I get there it'll be next year...
Thanks in advance.