my $fpath = '/somewhere/in'; my $fname = 'input.dat'; my $fn = "$fpath/$fname"; die "$fn: $!" unless -f $fn;