Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: archives etc

by coec (Chaplain)
on Apr 21, 2004 at 12:18 UTC ( [id://346980]=note: print w/replies, xml ) Need Help??


in reply to archives etc

How about using the standard Unix utility 'file' or even the Perl module File::Type.

use warnings; use strict; my @Progs = ('gzip', 'bzip2'); my $File = <STDIN>; foreach (@Progs) { my $Output = `file $File`; chomp $Output; `$_ -d $File` if ($Output =~ $_); }
I tried to have a look at File::Type also but during the install it spat lots of errors so I didn't go any further.

CC

Replies are listed 'Best First'.
Re: Re: archives etc
by eserte (Deacon) on Apr 21, 2004 at 13:04 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-03-29 07:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found