in reply to Re: $/ find a line
in thread $/ find a line

rather prefer it in a script version! but i guess this is not
while (<IN>) { $c = /^\$\$\$\$$/; if ($c) { s/^line(\d+)/name$1/ } }

Replies are listed 'Best First'.
Re^3: $/ find a line
by borisz (Canon) on Aug 10, 2004 at 11:53 UTC
    Nearly, it is: keep in mind, that you get backupfiles as filename.orig.
    BEGIN { $^I = ".orig"; } while (defined($_ = <ARGV>)) { if ($c) { s/^line(\d+)/name$1/; } $c = /^\$\$\$\$$/; print $_; }
    Boris