markjugg has asked for the wisdom of the Perl Monks concerning the following question:
Thanks!# 1. with extra parens, works as expected (($a,$b) = (qw/a b/)) || die; print "a: $a b: $b\n "; # 2. without || or parens, works as expected ($a,$b) = (qw/a b/); print "a: $a b: $b\n "; # 3. without parens, but with ||, $a is set to 'b' # and $b is not set. Why? ($a,$b) = (qw/a b/) || die; print "a: $a b: $b\n ";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: question about || operator and list context
by Aristotle (Chancellor) on Jun 22, 2003 at 02:10 UTC | |
|
Re: question about || operator and list context
by japhy (Canon) on Jun 22, 2003 at 02:19 UTC | |
|
Re: question about || operator and list context
by converter (Priest) on Jun 22, 2003 at 03:32 UTC | |
|
Re: question about || operator and list context
by BrowserUk (Patriarch) on Jun 22, 2003 at 03:53 UTC | |
by markjugg (Curate) on Jun 22, 2003 at 04:14 UTC | |
by BrowserUk (Patriarch) on Jun 22, 2003 at 04:29 UTC | |
by Aristotle (Chancellor) on Jun 22, 2003 at 13:27 UTC | |
|
Re: question about || operator and list context
by bobn (Chaplain) on Jun 22, 2003 at 04:37 UTC |