On Jan 16, 2006, at 9:03, Anders Stegmann wrote:
Actually, I have a highly complex datastructure in which both strings,
lists and hashes are values in a primary hash.
e.g.
$hash{$key}[0] = @list;
$hash{$key}[1] = $string;
$hash{$key}[2] = %hash;
In Perl data estructures can only store scalar values. That's why
references are used to emulate nested structures:
$hash{$key}[0] = [EMAIL PROTECTED]; # note that @s are arrays, not lists
$hash{$key}[1] = $string;
$hash{$key}[2] = \%hash;
There are some pages in the documentation about nested estructures,
have a glance at perldsc for instance.
-- fxn
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>