Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Distinguishing text from binary data

by Happy-the-monk (Abbot)
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2017-02-26 11:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (372 votes). Check out past polls.