in reply to What does 'last OP;' do?
It is indeed a label. last OP will jump to the } of the block labeled OP.
OP: { $r &= $v < $cv, last OP if $co eq '<'; $r &= $v <= $cv, last OP if $co eq '<='; $r &= $v != $cv, last OP if $co eq '!='; $r &= $v >= $cv, last OP if $co eq '>='; $r &= $v > $cv, last OP if $co eq '>'; $r &= $v == $cv; }
is the same as
if ($co eq '<' ) { $r &= $v < $cv; } elsif ($co eq '<=') { $r &= $v <= $cv; } elsif ($co eq '!=') { $r &= $v != $cv; } elsif ($co eq '>=') { $r &= $v >= $cv; } elsif ($co eq '>' ) { $r &= $v > $cv; } else { $r &= $v == $cv; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: What does 'last OP;' do?
by ikegami (Patriarch) on Jan 21, 2005 at 21:24 UTC | |
by TomDLux (Vicar) on Jan 22, 2005 at 21:29 UTC |