######################## #! /usr/local/bin/perl use strict; { my $i = 0; my ; my %testHash2; my $max = 1000000; my $startTime = time; print "Loading hash 1...\n"; for($i = 0; $i <= $max; $i++){ $testHash1{$i} = "THIS IS MY $i PROTEST SONG"; if($i%100000==0){ print "Loaded $i\n"; } } my $stopTime = time; printf("Hash 1 Rows/Sec: %.01f\n",$i/($stopTime-$startTime)); undef %testHash1; $i = 0; $startTime = time; print "Loading hash 2...\n"; for($i = 0; $i <= $max; $i++){ $testHash2{$i} = "THIS IS MY $i PROTEST SONG"; if($i%100000==0){ print "Loaded $i\n"; } } $stopTime = time; printf("Hash 2 Rows/Sec: %.01f\n",$i/($stopTime-$startTime)); } ##############