in reply to sequential substitutions
( echo '<foo>3</foo>'; echo '<foo>14</foo>'; echo '<foo>159</foo>') | +perl -e ' my $x = 0; while (my $l = <>) { $x++; $l =~ s/\d+/$x/; print $l; }' <foo>1</foo> <foo>2</foo> <foo>3</foo>
One world, one people
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: sequential substitutions
by Anonymous Monk on Aug 03, 2018 at 10:48 UTC | |
by hdb (Monsignor) on Aug 03, 2018 at 11:06 UTC | |
by Anonymous Monk on Aug 03, 2018 at 11:56 UTC | |
by AnomalousMonk (Archbishop) on Aug 03, 2018 at 15:00 UTC | |
by hdb (Monsignor) on Aug 06, 2018 at 08:25 UTC |