in reply to Trying to write a subroutine to return if file is Text or Binary
use File::LibMagic ':easy'; my $infile = $ARGV[0]; print $ARGV[0]," =", MagicFile($infile),"\n"; [download]