Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: How to find out a compressed file inside a script ?

by prasadbabu (Prior)
on Feb 19, 2009 at 15:35 UTC ( #745094=note: print w/replies, xml ) Need Help??


in reply to How to find out a compressed file inside a script ?

Hi balakrishnan,

try the below code and add your extensions as per your requirement, $filename =~ /\.(zip|gzip|txt)$/i

Also you can use File::Basename to get the file extensions exactly.

update: Sorry I misread the question, forgot to see 'dont'

Prasad

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://745094]
help
Chatterbox?
Discipulus hitting the edge: panic: gen_constant_list JMPENV_PUSH returned 2 at -e line 1.

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2018-02-21 13:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (280 votes). Check out past polls.

    Notices?