in reply to Basename Module

#!/usr/bin/perl -- use strict; use warnings; use Path::Tiny qw/ path cwd /; my $cwd = cwd(); my $thisfile = path( __FILE__ )->realpath; my $thisdir = path( $thisfile )->parent; my $dirname = $thisfile ->dirname; my $basename = $thisfile ->basename; print " cwd $cwd thisfile $thisfile thisdir $thisdir dirname $dirname basename $basename "; __END__ $ perl C:\one\two\file.pl cwd C:/ thisfile C:/one/two/file.pl thisdir C:/one/two dirname /one/two/ basename file.pl