Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Trying to write a subroutine to return if file is Text or Binary

by pvaldes (Chaplain)
on Jun 30, 2014 at 23:01 UTC ( #1091777=note: print w/replies, xml ) Need Help??


in reply to Trying to write a subroutine to return if file is Text or Binary

You could find this node useful also.
use File::LibMagic ':easy'; my $infile = $ARGV[0]; print $ARGV[0]," =", MagicFile($infile),"\n";
  • Comment on Re: Trying to write a subroutine to return if file is Text or Binary
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1091777]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2019-10-18 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?