Perl-Sensitive Sunglasses | |
PerlMonks |
Re^2: Array definition errorby gri6507 (Deacon) |
on Apr 15, 2005 at 15:25 UTC ( [id://448220]=note: print w/replies, xml ) | Need Help?? |
Actually that's not true. The line $trainset[scalar(@trainset)] = \@inputs; will increase the side of the @trainset array so that when $trainset[scalar(@trainset)] = \@outputs; is called, scalar(@trainset) will be one larger and therefore not overwrite the original data. This is akin to a push.
In Section
Seekers of Perl Wisdom
|
|