Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Separating file names from path names

by MZSanford (Curate)
on Oct 09, 2002 at 15:29 UTC ( #203960=note: print w/ replies, xml ) Need Help??


in reply to Separating file names from path names

In the event you cannot use any other modules (as seems to be common with questions of this sort), and you want the file name, with extention ... you could use :
my $file = $full_name; $file =~ s!.*\\!!g;
I think this is covered in The Perl Cookbook quite well.
from the frivolous to the serious

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2016-08-25 19:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The best thing I ever won in a lottery was:















    Results (362 votes). Check out past polls.