in reply to loading
You wrote:
This is wrong. Why do you have the || there? The || has higher precedence than the comma, so you're actually OR-ing "location.txt" with the die statement. "location.txt" will always be true, so that die will never get invoked, even if the open fails. Which is, I presume, when you wanted it to be invoked.open(shortcuts,"location.txt" || die"Can't open the stinkin' file" +);
Instead, use something like this:
This will die if the open fails.open SH,"location.txt" or die"Can't open the stinkin' file";
|
|---|