in reply to Re: Detecting 'binary' in a variable
in thread Detecting 'binary' in a variable
Not always
$ perl -le '{local$/; $_=<>;}print /^[\x00-\xA5]/ ? "binary" : "text" +' \ /mnt/win/WINDOWS/system32/command.com text
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Detecting 'binary' in a variable
by Transient (Hermit) on Jul 05, 2005 at 18:23 UTC | |
by dbwiz (Curate) on Jul 05, 2005 at 18:31 UTC | |
by Transient (Hermit) on Jul 05, 2005 at 18:36 UTC |