sub something { # ... open my $fh, '>', $_[0] or die "Couldn't open $_[0] for writing\n"; # ... }