Some of us always use scalar rather than implying it. It saves accidents and sometimes makes it clearer. Really, though, if I don't type it frequently I'll forget how to spell it. | [reply] [d/l] |
That's not very Perlish. I agree it can save some accidents,
but really, on subtraction? And why just use
scalar on one of the operands of -,
and not the other? Wouldn't
scalar ($sub [scalar (scalar (@-) - scalar (2))]) -> ()
be more "always use scalar rather than
implying it" then just using it once? Or do you perhaps
mean you only use it sometimes?
-- Abigail | [reply] [d/l] [select] |
Presumably, John meant that he always uses scalar on arrays (when they're in scalar context, of course). This implicit meaning in John's sentence is much like the implicit scalar on arrays in scalar context; if John had been explicit, you would not have been confused. ;)
| [reply] |