SPUG: Automagic non-matching in -B files

David Dyck david.dyck at fluke.com
Wed Aug 13 20:02:25 CDT 2003


On Wed, 13 Aug 2003 at 17:52 -0700, Tim Maher <tim at consultix-inc.com> wrote:

> I've just discovered that
>
>   perl -wlne 'print "Processing $. in $ARGV\n"; /./ and print' $HOME
>
> indicates that Perl automagically disallows any processing of records
> from the (binary) file, without warning or die'ing (instead of trashing
> the screen with spurious binary match-data, like commercial *grep*).

I don't get any warnings or errors from the above file (directory right?)
and

 perl -e 'print pack "c*", 0 .. 255' > binfile
 perl -le 'print "bin" if -B "binfile"'

 perl -wlne 'print "Processing $. in $ARGV\n"; /./ and print' binfile

prints out 2 records .




More information about the spug-list mailing list