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


in reply to Style or Clarity?

Whatever works for you is OK, although maintainers of your code may later grumble.

I don't think that context matters for the evaluation of the empty list in your code as any results are thrown away anyhow.

One way of testing it is wrapping your code in a subroutine and making sure that this part gets executed. As you know the return value of a sub is (unless you use an explicit return) the value of the last code evaluated. Check the return value of the sub and you will know it. To be on the safe side, call your subroutine in a scalar context and a list context and see if it matters.

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law