go ahead... be a heretic | |
PerlMonks |
Re: How to remove everything after last occurrence of a string?by Fletch (Bishop) |
on Jun 06, 2022 at 16:22 UTC ( [id://11144455]=note: print w/replies, xml ) | Need Help?? |
Something about this raises the "X/Y problem" hackles and makes me want to mumble something about using File::Spec and splitdir to break things up into a list of directory components instead (or Path::Tiny and doing . . . something). Or it could just be Monday and I'm making arbitrary connections that aren't there. That aside the previous quotemeta answer(s) obviously fixes the X issue.
The cake is a lie.
In Section
Seekers of Perl Wisdom
|
|