> may I recommend that you start with trying say:
> 
>       $hash{1} = [@array1];
> 
> or
>       my %hash = (
>               1 => [@array1],
>               2 => [@array2],
>       );

Be aware there is a difference between:

[@array1]

and:

\@array

because the former flattens the array, and then takes a
reference to a NEW array.  This can be useful, but be
careful if you think that's enough to clone the array...
it's not.  E.g.

my $array = [["test", "elements"], "third"];

print $array[0][0];
$array[0][0] = "retest";
print $array[0][0];

Almost always you want to store a reference to the original
array, it will be quicker.  Just be VERY careful when
modifying these complex datastructures in Perl, you might
change more than you realise (actually, this occurs in most
languages).

Jonathan Paton

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to