in reply to shift vs @_
sub foo { my $bar = shift || return; my $baz = shift || return '<p style="font-color:red">BAD</p>'; }
Again I'll note that this works only for non-true values, IOW if 0(zero) is acceptable then don't do this.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: shift vs @_
by ikegami (Patriarch) on Oct 02, 2006 at 21:14 UTC | |
|
Re^2: shift vs @_
by exussum0 (Vicar) on Oct 02, 2006 at 20:59 UTC |