in reply to How To Get The File's Directory?

I used File::Util. This script will get the cwd, strip and return the filename and path.

#!/usr/bin/perl use strict; use warnings; use Cwd; use File::Util; my ($f) = File::Util->new(); print getcwd, "\n", $f->strip_path('/master/bin/perl5.10.0'), "\n", $f->return_path('/master/bin/perl5.10.0'), "\n";