Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: perl script to print just directory names

by toolic (Bishop)
on Dec 06, 2012 at 20:25 UTC ( #1007642=note: print w/ replies, xml ) Need Help??


in reply to perl script to print just directory names

One way is to use File::Basename::basename:

use File::Basename; # in your loop... print basename($file);

See also:


Comment on Re: perl script to print just directory names
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2015-07-08 08:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (98 votes), past polls