Sorry in advance, your code was very clear, but there always needs to be someone to point out a way of doing some perl code in one line. echo 1 | perl -e "foreach(1...<>){print int(rand(9)).int(rand(9)).int(rand(9)).\"\n\"}" Where 1 is the number of APN's you need. Sorry Daniel Many people would sooner die than think. In fact they do. Bertrand Russell --Quoted in Antony Flew's Thinking About Thinking Steve Phillips wrote:
On Mon, 14 Feb 2005, Joe Abley wrote:
On 14 Feb 2005, at 18:43, Joshua Brady wrote:
So I'll shove in 003 nxx for example?
I think if you're happy for those fields in your database to be meaningless, you could enter any random number you liked.
In the spirit of helpfulness I have thrown together a small program to help you in your endevor.
-- cut -- #!/usr/bin/perl
use strict;
my $number = 1; my $x = 0;
if ($number == 0) { exit; }
while ($x < abs($number)) { print int(rand(9)) . int(rand(9)) . int(rand(9)) . "\n"; $x++; } -- end --
Hope you find it helpful. (Note, you will need perl installed in /usr/bin/perl, and it will need to be run on some *ix box, also, dont make $x anything other than 0 or weird things may happen, oh, and you can alter $number to be the number of values you require for your database thingy wotsit.)