http://qs321.pair.com?node_id=11124029


in reply to Re^2: What's the right way to write a method which returns one line at a time from a file?
in thread What's the right way to write a method which returns one line at a time from a file?

Not to the topic, but there should NEVER an else after a return/exit/croak/die.

A return/die/exit/croak will end the current scope immediately, making the else obfuscating the code that follows, as the code after the else block will never be executed if the if branch is taken.

If I were a code reviewer, that code would be vetoed.


Enjoy, Have FUN! H.Merijn