open(F, ">foo.txt") or die "hey, couldn't open foo.txt"; #### if (!open(F, ">foo.txt")) { die "hey, couldn't open foo.txt"; } #### # does not work die "missing arg $_" unless $args{$_} for (qw(foo bar baz boop)); #### # untested for (qw(foo bar baz boop)) { die "missing arg $_" unless $args{$_}; }