Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Style or Clarity?

by CountZero (Bishop)
on Jun 08, 2004 at 20:29 UTC ( #362536=note: print w/replies, xml ) Need Help??

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.


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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://362536]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2020-11-27 09:07 GMT
Find Nodes?
    Voting Booth?

    No recent polls found