Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: perl script to print just directory names

by marto (Chancellor)
on Dec 07, 2012 at 11:47 UTC ( #1007717=note: print w/ replies, xml ) Need Help??


in reply to Re: perl script to print just directory names
in thread perl script to print just directory names

"but can please someone show me how to store these basenames in some sort of array so that i can use them later part in the code."

Consider reading and understanding the code you've posted, you already do this for a different array/value:

push(@dir, $file);

So rather than print the value of basename($file) to screen push the value of basename($file) into @dir_names.Read push, http://learn.perl.org.

Update: slight clarification.


Comment on Re^2: 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://1007717]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (13)
As of 2014-07-29 16:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (222 votes), past polls