Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Q regarding glob

by 2teez (Vicar)
on May 16, 2013 at 19:07 UTC ( #1033890=note: print w/replies, xml ) Need Help??


in reply to Q regarding glob

Hi arunagiri,
"..How can I get only the folder names inside dir2? Is there any easy way to get it?.."

You could use basename subroutine from the module File::Basename.

Update:

basename("/foo/bar"); # this return "bar" #OR for my $ele (glob(...)){ print basename($ele), $/; }

If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2021-06-23 21:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (122 votes). Check out past polls.

    Notices?