- or download this
sub short {
my $path = shift;
$path = ˜ s{.*/}{};
$path;
}
- or download this
my $short = sub {
my $path = shift;
$path =~ s{.*/}{};
$path;
};
- or download this
perl -Mstrict -we '
+
my $dir = shift or die "missing dir name...\n";
...
full: temp01/subtemp01/subsubtemp04/file04
shortened: file04