Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

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?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (6)
As of 2015-11-26 07:15 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (696 votes), past polls