When I first saw that, I thought to myself "Couldn't that unless @thingies modifer be replaced by an ||=?" So I tried it, perl -e"@x=qw/foo bar/; @x ||= qw/baz/; print @x" And got this lovely error: Can't modify array dereference in logical or assignment (||=) at -e line 1, near "qw/baz/;". Can anyone explain why ||= doesn't work with an array, and what that error means?my @thingies = foo (); @thingies = bar () unless @thingies;
In reply to Re: Re: Precendence and wantarray puzzling me
by BUU
in thread Precendence and wantarray puzzling me
by ViceRaid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |