in reply to Re^2: Search and replace next line
in thread Search and replace next line
$cs="d:\\Perl\\Compiler_Setup.ini"; open cs or die "Cannot open $cs for read :$!"; while (<cs>) { if (m/"Gimpel PC-Lint for H8]"/){ # read the line to be replaced my $line = <cs>; # do something with it $line =~ s/1/0/; # print the new version print $line; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Search and replace next line
by Thilosophy (Curate) on Jan 05, 2005 at 12:13 UTC | |
by Anonymous Monk on Jan 05, 2005 at 12:19 UTC | |
by perlnewbie2000 (Initiate) on Jan 05, 2005 at 12:29 UTC |