Actually, that's exactly what it was doing. The way your code was written, it would have inserted all the lines from the file into the hash(granted the nested while was reinserting that same hash values 10 times each). It was the line immediately after the foreach loop, as kabel already pointed out, which was resetting your your hash to just one key/value pair:
# This is the culprit! %member = ( $timestamp => [$current_time, $funds, $action, $current_fu +nds]);
That line was resetting the %member hash to the last values of $timestamp, et al. Removing that line would leave you with a hash with every line split and inserted. Now since you only wanted the last 10 lines, the for loop code I posted simply took an array slice from 0-9 and iterated over those, effectively letting the loop parse only the last 10 lines of the file.
Hope that clears things up a bit.
In reply to Re: Re: Re: Making a hash of making a hash of an array
by pzbagel
in thread Making a hash of making a hash of an array
by jonnyfolk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |