
June 27th, 2000, 11:15 AM
|
 |
Contributing User
|
|
Join Date: Jun 2000
Location: Southern California
Posts: 73
Time spent in forums: 56 m 9 sec
Reputation Power: 13
|
|
|
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by bydavid:
i have written a class in the form of a hash. inside of that class, i have an array.
how would i print out the contents of that array? how would i modify 1 element of the array?[/quote]
I assume that you mean you have a data structure like this:
$hash = { item => [ 'arrayitem1', 'arrayitem2' ] };
To get a list of values for array 'item', you could use:
@vals = @{$hash->{item}};
To modify it, do this:
$hash->{item}->[0] = 'this';
Hope this helps...
[This message has been edited by vpopper (edited June 27, 2000).]
|