run script reformatter
"three-hundred-two files processed"
hey! where'd they all go?

Replies are listed 'Best First'.
Re: Backup
by tachyon (Chancellor) on Nov 28, 2001 at 21:42 UTC
    local $/; for (@files) { open F, "+<$_" or die $!; my $data = <F> $data = s/foo/bar/g; seek F, 0, 0; print F $data; print "Oops, erased $_ with the old forgot the ~ trick\n" close F; } # but with Perl # as we all know # minus i dot bak # cures backup woe perl -e -pi.bak "s/foo/bar/g" @files #!/usr/bin/perl -i.bak @ARGV or die "Useage perl munge.pl <list of files>\n"; while (<>) { s/foo/bar/g; print; }

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print