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


in reply to Re^3: A regarding glob
in thread Q regarding glob

I find the solution easier with both split and

 $element =~ m!dir1/dir2/(.*)/dir3/filename!;

Replies are listed 'Best First'.
Re^5: A regarding glob
by LanX (Saint) on May 17, 2013 at 17:54 UTC
    It's the same solution, just less abstract and therefore more vulnerable for typos and other errors!

    Good luck! =)

    Cheers Rolf

    ( addicted to the Perl Programming Language)