|
|
| Come for the quick hacks, stay for the epiphanies. | |
| PerlMonks |
Re: splitting array valuesby bobn (Chaplain) |
| on May 19, 2004 at 21:22 UTC ( [id://354812]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
First it sounds like you don't really know what is in $score[0] (note not @score[0], though that may work). To get around this, This will tell you what is actually in @score, where the first element will be $score[0]. Also, an array doesn't really contain another array. arrays can only contain scalars, though one type of scalar is a refrence, which can be thought of as a pointer to another array. If $score[0] is such a reference to an array, the correct notation is: This properly de-references the referance to feed an array into the sort.
--Bob Niederman, http://bob-n.com All code given here is UNTESTED unless otherwise stated.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||