I'm not sure if this SOPW or a Meditation since it's somewhere inbetween but here goes.
I'm in the process of writing a cgi program that is going to look for a user's config file. The file is going to be made up of the user's selected items selected from a large number of checkboxes.If said file doesn't exist, that's not a problem as it's going to create one. If the file does exist then I wanted to be able to recreate the checkbox page with the current selections already checked. So far no problem.
My question is regarding die. I've always seen code such as:
open FH, ">user1.cfg" or die "Couldn't open file;
but in my case that isn't going to apply.
I really don't care if the file doesn't exist initially since I'm going to build it if it doesn't.
Hence my question: Should you always die after a file not found or is that a bad coding practice?
There is no emoticon for what I'm feeling now.
In reply to To die or not to die by Popcorn Dave
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |