in reply to Making a hash of making a hash of an array
open (FILE, "$record") or die "can't open $record: $!"; my @record = reverse <FILE>; close FILE;
this is 100% wrong, because %member contains afterwards exactly one element, the ten that got into before are lost. you want:%member = ( $timestamp => [$current_time, $funds, $action, $current_funds]);
then, you really want to use strict; #damn ;) and to use CGI; or an equivalent module. see the tutorials for why.$member{$timestamp} = [$current_time, $funds, $action, $current_funds];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Making a hash of making a hash of an array
by jonnyfolk (Vicar) on Jun 04, 2003 at 05:24 UTC |