#!/usr/bin/perl # This function generates random strings of a given length sub generate_random_string { my $length_of_randomstring=shift;# the length of # the random string to generate # my @chars=('A'..'Z','0'..'9','+','-',','); my @chars=('A'..'Z'); my $random_string; foreach (1..$length_of_randomstring) { # rand @chars will generate a random # number between 0 and scalar @chars $random_string.=$chars[rand @chars]; } return $random_string; } #Generate the random string my $random_string=&generate_random_string(11); my $i; my $random_string; my $random; my $lower=10000; my $upper=99999; # ======================================================================================== # Please change the numbers in the for loop below for controlling the ID and the row count # ======================================================================================== for ($i=1;$i<10000001;$i++) { $random_string=&generate_random_string(2); $random = int(rand( $upper-$lower+1 ) ) + $lower; # printf "%28.0f\n",$random; printf "$i\t$random\t$random_string\n"; }