William Olbrys wrote: > > > The problem is my search and replace does not work. I'm new to perl and > I find the perlre syntax very confusing. I simply want to replace one > word(a string) with a much bigger string! How are files accessed > differently than regular strings? I don't receive an error though. It > just doesn't replace the string... any help would be appreciated. > > Will Olbrys. > use strict;
print "Content-type: text/html\n\n"; my $file = "./test1.txt"; my $file2 = "./test2.txt"; open (TEXT, $file); open (TEXT2, $file2); my $game = join ' ', <TEXT>; # getting content of files to string my $index = join ' ', <TEXT2>; # getting content of files to string $index =~ s/inpoint/$game/; # replace "inpoint" with content $file2 print $index; close(TEXT); close(TEXT2); exit(0); -- LaVei -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]