in reply to Path parsing from full to relative
#! /usr/bin/perl use warnings; use strict; use Test::More tests => 3; use Path::Tiny; my %expected; @expected{qw{ C:/somedirectory/anotherDirectory/WorkingDirectory/myFile.txt C:/somedirectory/anotherDirectory/WorkingDirectory/Logs/myLogs.txt C:/somedirectory/anotherDirectory/WorkingDirectory/Stuff/myStuff.t +xt }} = qw(WorkingDirectory/myFile.txt WorkingDirectory/Logs/myLogs.txt WorkingDirectory/Stuff/myStuff.txt); for my $path (keys %expected) { is path($path)->relative('C:/somedirectory/anotherDirectory'), $expected{$path}, $path; }
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|