if (! @ARGV) { use open ':raw'; # implicit binmode on each open open(ARGV, '-'); } else { use open ':raw'; open(ARGV, shift @ARGV); # Yeah, it's the two-arg version, # because that's what perl does with <> # see perlopentut } # ... now go do all that sysread stuff. #### my @files = (@ARGV)?@ARGV:qw(-); NEXTFILE: while (@files) { use open ':raw'; open(ARGV, shift @files); # do sysread stuff here # don't forget that an eof here may not be a "real" eof, # but a signal to go to the next file } #### @/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/; map{y/X_/\n /;print}map{pop@$_}@/for@/