!/usr/local/bin/perl -w use strict; use Cwd qw/getcwd chdir/; chdir '/x/y/z' or die $!; print getcwd(),"\n";