in reply to
Perl match to cut off after second occurrence
Try this:
(my $dir = $0) =~ s/([^\\]+\\([^\\]+\\)?)?.*$SC/$1/;
Comment on
Re: Perl match to cut off after second occurrence
Download
Code
In Section
Seekers of Perl Wisdom