Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Distinguishing text from binary data

by Happy-the-monk (Monsignor)
on Oct 05, 2004 at 13:25 UTC ( #396570=note: print w/ replies, xml ) Need Help??


in reply to Distinguishing text from binary data

Is there a CPAN module for this kind of thing?

There are numerous. Some of them even work on scalars, not only filehandles. Have a look at File::MimeInfo::Magic and File::LibMagic for a start.

For most similar tasks, yet not for your actual one you may find File::MMagic most useful.

Cheers, Sören


Comment on Re: Distinguishing text from binary data

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (11)
As of 2014-08-20 06:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (105 votes), past polls