in reply to help with error 'readline() on unopened filehandle'

There are two different answers above which point you to this but the essence is - If you are not using brackets you must know operator precedence.

And of course you should also know that 'or' works between statements because each statement evaluates to true or false.

Getting messed up with file open occurs so often that I find it far easier to enforce die on failure. I understand why Perl does this but personally when I open a file, nearly always, I expect to have it open.

  • Comment on Re: help with error 'readline() on unopened filehandle'