in reply to Re^4: Data Structures
in thread Data Structures
Without @{ .. } to derefernce the anonymous array reference, $x would be set to that array reference and $y & $z would be undef.
$line[ 1 ][ 2 ] = [ 3,4,5 ];; my( $x, $y, $z ) = $line[ 1 ][ 2 ];; print for $x, $y, $z;; ARRAY(0x194a9f8) Use of uninitialized value in print at ... Use of uninitialized value in print at ...
With the dereference:
my( $x, $y, $z ) = @{ $line[ 1 ][ 2 ] };; print for $x, $y, $z;; 3 4 5
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|
---|
In Section
Seekers of Perl Wisdom