in reply to Re: What's happening in this expression? (Updated)
in thread What's happening in this expression?
my $a=$x=$y=$z = foo()Here my attribute does not propogate like in case of comma. It applies only to $a, right ?
But now the fun starts
DB<3> use v5.10
DB<4> my $a=$x=$y=$z = 1
DB<5> say "|$a|$x|$y|$z|"
||1|1|1|
DB<6> unless( defined($a) ){ say "a is undefined"}
a is undefined
why $a remains uninitialized?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: What's happening in this expression? (Updated)
by Fletch (Bishop) on Oct 12, 2020 at 03:25 UTC | |
by likbez (Sexton) on Oct 15, 2020 at 04:08 UTC | |
by haukex (Archbishop) on Oct 15, 2020 at 09:20 UTC | |
by likbez (Sexton) on Oct 16, 2020 at 21:18 UTC | |
by haukex (Archbishop) on Oct 17, 2020 at 09:39 UTC | |
| |
|
Re^3: What's happening in this expression? (Updated)
by haukex (Archbishop) on Oct 12, 2020 at 08:45 UTC | |
|
Re^3: What's happening in this expression? (Updated)
by AnomalousMonk (Archbishop) on Oct 12, 2020 at 01:52 UTC | |
|
Re^3: What's happening in this expression?
by LanX (Saint) on Oct 12, 2020 at 07:22 UTC |