in reply to Style or Clarity?

B::Deparse reported this construct as an empty list
if ($tmp eq 'F') { (); }elsif ...
OK, so is an empty list placed at this point in the bytecode so that when reached, the program evaluates the list? In what context? Or is this just a shorthand display for some NOOP code?
The actual bytecode at this point is a single 'stub' op, whose action is to return undef in a scalar context and nothing otherwise. In your example, it's called in a void context. The empty list happens to compile to the same op.


Replies are listed 'Best First'.
Re^2: Style or Clarity?
by periapt (Hermit) on Jun 09, 2004 at 12:44 UTC
    Ah, so that's it. :o) Thanks

    We are drowning in information and starving for knowledge - Rutherford D. Rogers
    What good is knowledge if you have to pull teeth to get it - anonymous