Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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?
[erix]: the stuff is pretty high up as I understand it; I have not felt any effect on lungs/breathing
[LanX]: Apocalypse Wow
[Corion]: Yeah, FF isn't great but Chrome isn't great either. They added some features to the devtools but broke (at least since yesterday) sending custom headers and overriding the UA header

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (10)
As of 2017-10-17 12:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (230 votes). Check out past polls.

    Notices?