# kids, don't do that at home...
perl -pi -e "BEGIN{binmode *ARGV}; s/f\0o\0o/b\0a\0r/g" *.dll
- did you try that? Don't have windows, so I can't check its effect :-/
update - but that should do, since from perlop
The loop
while (<>) {
... # code for each line
}
is equivalent to the following Perl-like pseudo code:
unshift(@ARGV, '-') unless @ARGV;
while ($ARGV = shift) {
open(ARGV, $ARGV);
while (<ARGV>) {
... # code for each line
}
}
so setting binmode to the IO slot of the *ARGV typeglob is just fine.
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|