in reply to regex help

You can use Path::Tiny to solve most of the file and path related tasks. In this case:
use Path::Tiny; my $str1 = "/fold1/fold2/fold3/file.pl"; print path($str1)->dirname, "\n";
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^2: regex help
by vijesh (Novice) on Oct 24, 2014 at 13:11 UTC

    wow.. this is a great help too. -Vijesh