> s/192.168.1.85/10.0.0.1/g
> print FILE $_;
hello,
Here the first line you lost a ';' at the end.
The whole script I've tested fine as below:
use CGI qw(:standard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
use strict;
print header;
print start_html("Modify Information");
my $file = '/tmp/test.txt';
open FILE,$file or die $!;
my @file = <FILE>;
close FILE;
open FILE,">",$file or die $!;
for (@file) {
s/192.168.1.85/10.0.0.1/g;
print FILE $_;
}
close FILE;
print end_html;
__END__
Hope this helps!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/