in reply to 3-arg open() does not give warnings!?

Your example 'bad' item, if ARGV[0] is undefined, would be the same as:

open ( O, '>', undef ) or die $!;

Because you're stringifying an undefined value in your two arg case, it would actually be closer to the three arg:

my $file = undef; open ( O, '>', "$file" ) or die $!;

I agree it's a problem... I just didn't think that the two tests were similar. (and I have no idea how open does the test for how many args it was passed, so it's possible that this is an odd edge case that doesn't get processed at all...)