$! = 0; stat("non_existing_file"); die "died at first stat" if -$!; stat("non_existing_file"); die "died at second stat" if -$!;