Started to reply with a similar Path::Tiny invocation then read what you'd linked so . . . foo. Instead, File::Spec(::Functions):
$ perl -MFile::Spec::Functions=splitdir -E '@p = splitdir( "/x/y/z/a/b +/c/d/e.f" );say join( qq{\n}, @p[-3,-2,-1] )' c d e.f
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re^2: Regex to extract last 3 components of filename
by Fletch
in thread Regex to extract last 3 components of filename
by mjurgens
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |