Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: file type

by eg (Friar)
on Feb 09, 2001 at 03:22 UTC ( [id://57288]=note: print w/replies, xml ) Need Help??


in reply to file type

You can use File::MMagic, but be forewarned, I didn't find it very fast.

Update: ah, good point Arturo. I hadn't fully comprehended the question's substance. Catagorizing by filename extension seems like the best solution.

Replies are listed 'Best First'.
Re: Re: file type
by arturo (Vicar) on Feb 09, 2001 at 03:24 UTC

    That's an interesting approach, but I'd guess it's designed to figure out MIME types. I dunno if different kinds of source code are going to have distinct MIME types (but maybe the module could be hacked so as to recognize them ...). I also note that it seems to work its magic based on the extension, primarily, which is what I suggested above.

    Philosophy can be made out of anything. Or less -- Jerry A. Fodor

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-03-29 06:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found