# kids, don't do that at home... perl -pi -e "BEGIN{binmode *ARGV}; s/f\0o\0o/b\0a\0r/g" *.dll #### while (<>) { ... # code for each line } #### unshift(@ARGV, '-') unless @ARGV; while ($ARGV = shift) { open(ARGV, $ARGV); while () { ... # code for each line } }