my $a = 'a.txt'; my $b = 'b.txt'; copy $a, $b or die "can't copy $a to $b: $!"; die "can't find copied file $b: $!" unless -f $b;