As a side note, I wonder wether perl could emit a warning when one tries to open() an anonymous file for reading (or for writing) only... or are there common situations in which it could be desirable to do so?Perl doesn't warn on deliberate features, whether common or not. Perl autovivifies undefined filehandles, and array and hash references, and allows you to do my $var; $var += 3; without warning as well. They are all features.
That's life in a featurefull language like Perl. You can't expect to have your hand held at all times. Using strict and warnings only give you some guidance, but that doesn't mean any carefree coding will be caugth. Just like wearing seatbelts doesn't mean your car can't drive at unsafe speeds.
In reply to Re: I've been bit in the neck by open()
by Anonymous Monk
in thread I've been bit in the neck by open()
by blazar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |