in reply to How to cut the directory path?
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to cut the directory path?
by aca (Initiate) on Feb 10, 2016 at 07:20 UTC | |
by Laurent_R (Canon) on Feb 10, 2016 at 07:29 UTC | |
by Anonymous Monk on Feb 10, 2016 at 07:24 UTC | |
by AnomalousMonk (Archbishop) on Feb 10, 2016 at 18:50 UTC |