#!/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
In reply to Re: Basename Module (use Path::Tiny)
by Anonymous Monk
in thread Basename Module
by ostra
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |