> >$array[0] = split(' ','apples trucks');

this is equivalent to:

my @tokens = split(' ','apples trucks');
$array[0] = scalar @tokens;

Thus you get 2 which is the size of the array returned by split, which you 
are not retaining by any means. What you want to do is this:

@{$array[0]} = split(' ','apples trucks');

which will correctly treat the first element of @array as a reference to 
another array and fill it with whatever list data split provided.

Hope this helps

Peter

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to