C:\test>perl -le"printf qq[key%07d*value\n], $_ for 1 .. 20e6" >bigfile C:\test>dir bigfile 11/04/2012 04:34 370,000,001 bigfile #### C:\test>perl -F\* -anle"$h{$F[0]}=$F[1] }{ print `tasklist /nh /fi \"pid eq $$\"`" bigfile perl.exe 3140 Console 1 4,509,624 K #### open my $out, '>', 'bigfile' or die $!; my $l = 0; while( $l < 350*1024*1024 ){ my $part1 = join '', map { ('A'..'Z','a'..'z',0..9)[rand(62)] } (0..(rand(30)+10)); my $part2 = join '', map { ('A'..'Z','a'..'z',0..9)[rand(62)] } (0..(rand(30)+10)); my $output = "$part1*$part2\n"; $l += length $output; print $out $output; } my $filesize = -s 'bigfile'; say 'File size: ', $filesize;