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

Re: Re: parse filenames

by CukiMnstr (Deacon)
on Apr 12, 2002 at 17:28 UTC ( [id://158632]=note: print w/replies, xml ) Need Help??


in reply to Re: parse filenames
in thread parse filenames

just to be on the safe side (in case the suffix contains letters or is longer than 3 chars):
my $suffix = $file =~ m/\.(.+)$/;

hope it helps,

Replies are listed 'Best First'.
Re: Re: Re: parse filenames
by ehdonhon (Curate) on Apr 12, 2002 at 19:12 UTC

    Make sure the file doesn't have more than one dot..

    my ($suffix) = $file =~ m/([^\.]+)$/;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2024-04-16 18:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found