This article is a good intro to Path::Tiny.#!/usr/bin/env perl use strict; use warnings; use Path::Tiny; my $filespec = "/usr/share/directory/piano_book.mp4"; my $path = path($filespec); my $rel = $path->relative("/usr/share"); print $rel, "\n"; exit;
In reply to Re: How to cut the directory path?
by kevbot
in thread How to cut the directory path?
by aca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |