#!/usr/bin/perl use strict; print "Content-type: text/html\n\n"; srand(); my $fil = "ch"; open( OUT, '>', $fil ) or die $!; binmode OUT; for my $i ( 1 .. 10_000 ) { my $j = int( rand( 20_000 ) ) + 440_000; my $k = substr( pack( 'l>', $j ), 1 ); print OUT $k; } close( OUT ); print "DONE !";