The correct solution in this case is using basename, since it is a filepath problem. More generally, it's a split() problem. Only most generally is regexp appropriate. Even then, I would avoid POSTMATCH - while the expense is tolerable, it's still high. Better to actually match the string you want, and remember that.
$x =~ m|(?:[^/]/)*/(.*)}; print $1;
--
TTTATCGGTCGTTATATAGATGTTTGCA
In reply to Re: getting the tail of a string
by TomDLux
in thread getting the tail of a string
by tos
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |