use File::Copy qw( move ); move( $file_in_old_location, $new_location ); #### use Cwd; my $pwd = cwd(); chdir( $somewhere_else ); # ... now you can do something over there chdir( $pwd ); # restores original location.