![]() |
|
more useful options | |
PerlMonks |
Re: Trimming Paths with regexesby Hofmator (Curate) |
on Aug 30, 2001 at 14:43 UTC ( [id://109039]=note: print w/replies, xml ) | Need Help?? |
Just to show that it's not too complicated with a regex: You can use a subroutine as well, then the regex is pretty simple if you handle the special case beforehand:
Update: Fixed small bug in the subroutine. -- Hofmator
In Section
Seekers of Perl Wisdom
|
|