use autodie; open my($fh), '>' '/f/o/o'; print $fh "stuff\n"; ...