Path manipulation 

use Path::Tiny qw(path);

my $path = path('/home/grant/projects/talks/path-tiny/talk.xml');

say $path->basename;
# talk.xml

say $path->parent;
# /home/grant/projects/talks/path-tiny