Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Answer: How do I split a string containing path+filename

by arturo (Vicar)
on May 14, 2001 at 18:30 UTC ( #80210=categorized answer: print w/replies, xml ) Need Help??

Q&A > strings > How do I split a string containing path+filename - Answer contributed by arturo

For maximum portability, use File::Basename, a standard CPAN module:

use File::Basename; use strict; # get full path in $path my $filename = basename($path);

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
Tux => $HOME
[Tanktalus]: great, now I'm going to have to convert html codes to text for display... :)
[choroba]: Can you steal the code from pm-cb-g?

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2017-09-25 21:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (291 votes). Check out past polls.

    Notices?