in reply to "Change, but don't touch" or naive use of perl -pi
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.
|
|---|