in reply to Re^2: How to cut the directory path?
in thread How to cut the directory path?

How it can be done using regular expression?

You let Path::Tiny use File::Spec which uses regular expressions for you.