use Path::Tiny; my $str1 = "/fold1/fold2/fold3/file.pl"; print path($str1)->dirname, "\n"; [download]
In reply to Re: regex help by choroba in thread regex help by vijesh