use File::Spec; my $f = 'File::Spec'; print $f->curdir, "\n"; print $f->updir, "\n"; #### $ perl ./test_file_spec . .. $