Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: die not exiting Applicationby Corion (Patriarch) |
on Apr 16, 2008 at 06:35 UTC ( [id://680736]=note: print w/replies, xml ) | Need Help?? |
Most likely you are not using strict. Your line makes little sense because open usually takes at least two parameters, the filehandle to be opened and the name of the resource to be accessed:
That said, your code fails for me as expected:
I didn't know and haven't used the 1-argument form of open and for good reason, because that means action at a very large distance:
In this case, the 1-argument form does not die because the file named in $FILE exists. But that is substantially different from your code. Update You silently update your node. I consider that quite rude. Please mark updates to your node with <b>Update:</b> or something and don't overwrite the complete node. Your new code fails for me as expected:
Maybe you want to do more rigorous checks:
In Section
Seekers of Perl Wisdom
|
|