The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to determine what type of backup I've on the tape fraydey UNIX for Dummies Questions & Answers 2 05-12-2008 04:52 AM
Using 'stat' to determine file system type (with Zenity) mdpalow Shell Programming and Scripting 0 12-19-2007 09:49 PM
use perl to get file type ? the_learner Shell Programming and Scripting 1 10-26-2007 07:04 PM
Human readable type vs MIME type detection using file spauldingsmails Shell Programming and Scripting 0 03-21-2007 08:43 PM
Command to determine Tape Type Surdeymon AIX 4 06-10-2005 10:19 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-10-2006
Registered User
 

Join Date: Aug 2005
Posts: 229
Stumble this Post!
determine file type with perl

Hello
i will like to know please how can i determine file type inside perl script
not using the unix "file" program
Thanks allot
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 01-11-2006
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 3,851
Stumble this Post!
file uses magic numbers to decide what a file type is.

You can get file::type from:

http://search.cpan.org/~pmison/File-...b/File/Type.pm

Note that it is version 0.22, which usually indicates that it's a work in progress...
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:06 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0