MESSAGE
DATE | 2002-06-21 |
FROM | Ruben Safir
|
SUBJECT | Subject: [hangout] perl hash value
|
This is covered int he Perl Classes given by NYLXS which are inexpenssive.
There is no such thing as an array of arrays. There is only an array of array references
Something like this would work
$myhash{ $reararyref1 => [$arrayref2 ,$arrayref3...] $reararyref2 => [$arrref4, arrayref5 ], $reararyref3 => [$arrref4, arrayref5 ], $reararyref4 => [$arrref4, arrayref5 ], $reararyref5 => [$arrref4, arrayref5 ], $reararyref6 => [$arrref4, arrayref5 ], $reararyref7 => [$arrref4, arrayref5 ], $reararyref8 => [$arrref4, arrayref5 ], }
Or just assign them like this
$arrayref = \-at-myarray; $arrayref2 = \-at-myarray;
%hash = ($arrayref = > $arrayref2);
or
$hash[1][2] = value;
Ruben
On Fri, Jun 21, 2002 at 07:10:36AM -0700, steven melendez wrote: > Hi, > > Does anyone know how what the syntax is for defining a > hash whose values consist of an array of arrays. > > ie. something like > %hash = ( > "1" => ((array),(array),(array)) > ); > > but I don't think the value syntax is correct > > Thanks for any help, > > -steven > > __________________________________________________ > Do You Yahoo!? > Yahoo! - Official partner of 2002 FIFA World Cup > http://fifaworldcup.yahoo.com > > > ## WWWAC VWW Nite: 21 DOG YEARS, 6/21 ** WWWACnic in Central Park, 6/23 ## > ## The World Wide Web Artists' Consortium --- http://www.wwwac.org/ ## > ## To Unsubscribe, send an e-mail to: wwwac-unsubscribe-at-lists.wwwac.org ##
-- __________________________
Brooklyn Linux Solutions __________________________ http://www.mrbrklyn.com - Consulting http://www.brooklynonline.com - For the love of Brooklyn http://www.nylxs.com - Leadership Development in Free Software http://www.nyfairuse.org - The foundation of Democracy http://www2.mrbrklyn.com/resources - Unpublished Archive or stories and articles from around the net http://www2.mrbrklyn.com/mp3/dr.mp3 - Imagine my surprise when I saw you... http://www2.mrbrklyn.com/downtown.html - See the New Downtown Brooklyn....
1-718-382-5752
____________________________ New Yorker Linux Users Scene Fair Use - because it's either fair use or useless....
|
|