http://www.perlmonks.org?node_id=1033890


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