Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Binding Question

by mkmcconn (Chaplain)
on Jul 24, 2002 at 14:49 UTC ( [id://184865]=note: print w/replies, xml ) Need Help??


in reply to Binding Question

That's an icky and unreliable way to get the filename from a path (my repentance for using it in the past is showing).

File::Basename, File::Spec and URI::file are more portable.

But, for another quicky that may or may not be more legible (it's a common idiom), this will also work for *nix and MS paths:

my ($fname) = $fullpath =~ m/([^\\|\/]+)$/;

mkmcconn
update: modified my tone and added a module

Log In?
Username:
Password:

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

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

    No recent polls found