use vars qw($Bin); BEGIN { $Bin = qx(pwd) } chdir $Bin . $ARGV[0];