go ahead... be a heretic | |
PerlMonks |
Re: Return value from a binding operator?by Don Coyote (Hermit) |
on Apr 12, 2013 at 16:21 UTC ( [id://1028410]=note: print w/replies, xml ) | Need Help?? |
Hi Chris, Think of the middle match as a substition. the match basically looks to match all of the string after the last / character. The end of line anchor $ is included in the capturing group, where we may be used to seeing this outside of the capturing group. It does not so much as as strip the path off, rather matches the final part of the path, or the basename. I don't know if including the eol anchor $ retrieves the eol character or makes no difference.
this would also match a path with no directories.
In Section
Seekers of Perl Wisdom
|
|