$ perl -E " use Path::Class; my $path = file(q[/ro/sham/bo.foo]); say $path->parent; say $path->basename; " \ro\sham bo.foo