in reply to enforcing list context
Try putting another set of brackets around the ternary:
sub value { my ($self) = @_; return ( $self->{first}, ( $self->{rest} ? $self->{rest}->value : () ) ); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: enforcing list context
by billh (Pilgrim) on Apr 26, 2006 at 11:11 UTC | |
by BrowserUk (Patriarch) on Apr 26, 2006 at 11:37 UTC |