Try putting another set of brackets around the ternary:
sub value { my ($self) = @_; return ( $self->{first}, ( $self->{rest} ? $self->{rest}->value : () ) ); }
In reply to Re: enforcing list context
by BrowserUk
in thread enforcing list context
by billh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |