I think you need to explain a little better what you're trying to do
here, and what you EXPECT to happen.  For one thing, why are you using
$u as your array index?  Are you sure you don't want a hash?



-----Original Message-----
From: Tom Allison [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 01, 2005 5:07 PM
To: beginners perl
Subject: reference trouble

I'm trying to convert a hash of hashes to an array of hashes...

$hash isa hash reference...

my $array;
while ( my ($k, $v) = each %$hash ) {
        my $u = str2time($k);  #convert to unix timestamp
        $$array[$u] = $v;
}



--
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