my @real; my $target = qr/(:Timeplaner):Projekt,/; while (<>) { if (/$target/) { push @real, $ARGV; close ARGV; } } @ARGV = @real; $^I = ""; while (<>) { s/$target/$1$1,/; print; }
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to •Re: "Change, but don't touch" or naive use of perl -pi
by merlyn
in thread "Change, but don't touch" or naive use of perl -pi
by Happy-the-monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |