Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Explaining small Codeby hdb (Monsignor) |
on Sep 20, 2013 at 14:25 UTC ( [id://1055042]=note: print w/replies, xml ) | Need Help?? |
In split, it is explained that split; defaults to split ' ', $_;. \@numbers is not de-referencing but is creating a reference to the array @numbers. So @matrix will be an array of array references. Without it, the push would push all individual elements of @numbers onto @matrix, effectively creating a long one-dimensional list instead of a matrix.
In Section
Seekers of Perl Wisdom
|
|