in reply to Re^2: A regarding glob
in thread Q regarding glob
> Sorry if I didn't mention it clearly.
Sorry still not clear! (And unfortunately you didn't update your posts with code-tags either).
2 possibilities:
- If you want the whole sub-path which fills into the wild-card, then the demonstrated code is already perfect. Try it out.
- If you're only interested in the highest level folder do a @folders = split '/', $path for every path found by your glob and just take $folder[$index], where index is the number of folders in the "head" part.
E.g 4 for "../../dir1/dir2/" will give you the next directory after "dir2".
Cheers Rolf
( addicted to the Perl Programming Language)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: A regarding glob
by arunagiri (Initiate) on May 17, 2013 at 17:43 UTC | |
by LanX (Saint) on May 17, 2013 at 17:54 UTC | |
Re^4: A regarding glob
by arunagiri (Initiate) on May 17, 2013 at 17:44 UTC |
In Section
Seekers of Perl Wisdom