in reply to capturing from path
To break a path up into directory and file components, you can either split on the / character, or for a more portable solution, use File::Spec's splitpath and splitdir functions.
In Section
Seekers of Perl Wisdom