in reply to Re^4: "last expression" quiz
in thread "last expression" quiz
You're not arguing that they shouldn't be, are you?
No, I'm certainly not. I'm perfectly happy that those are errors. I don't know if it follows that sub x {$_ for 10} should be an error but I can see the argument for it. I see usefulness on both sides. Causing an error would be useful in preventing some god awful code while returning the result of the last expression evaluated would be useful in some god awful code. Usually, when there is a choice like that, Perl supports the latter but prints a warning under -w ... :-)
-sauoq "My two cents aren't worth a dime.";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: "last expression" quiz
by Anonymous Monk on Oct 20, 2005 at 17:15 UTC |