and run it as "perl replace_test.pl Compiler_Setup.ini". If the output looks okay, use "perl -i replace_test.pl Compiler_Setup.ini"while (<>) { print; if (m/Gimpel PC-Lint for H8\]/){ # read the line to be replaced my $line = <>; # do something with it $line =~ s/1/0/; # print the new version print $line; } }
In reply to Re^4: Search and replace next line
by Thilosophy
in thread Search and replace next line
by perlnewbie2000
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |