Hello all If the phone number for a NZ Company is +64 3 548 1111 would the NPA be 3 and NXX 548? If not, can someone correct me?
On 14 Feb 2005, at 18:06, Joshua Brady wrote:
Hello all
If the phone number for a NZ Company is +64 3 548 1111 would the NPA be 3 and NXX 548? If not, can someone correct me?
NPA/NXX is a NANPA construct, and has no meaning outside North America. The rough analogue for NPA would be an area code, which in your example would be "3". The mapping between the digits following the area code and network infrastructure will probably depend on who is operating the number block that contains the number. Joe
On Mon, 14 Feb 2005 18:18:31 -0500, Joe Abley
On 14 Feb 2005, at 18:06, Joshua Brady wrote:
Hello all
If the phone number for a NZ Company is +64 3 548 1111 would the NPA be 3 and NXX 548? If not, can someone correct me?
NPA/NXX is a NANPA construct, and has no meaning outside North America.
I need something to put into a database :)
The rough analogue for NPA would be an area code, which in your example would be "3". The mapping between the digits following the area code and network infrastructure will probably depend on who is operating the number block that contains the number.
So I'll shove in 003 nxx for example?
Joe
Josh
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.) -- Steve.
On Mon, 14 Feb 2005, Steve Phillips wrote:
In the spirit of helpfulness I have thrown together a small program to help you in your endevor.
-- cut -- #!/usr/bin/perl [Stuff Deleted] -- end --
Oh great. You posted code. Of course, you realise that this will result in replies in which people analyse your code for standards compliance, produce smaller/siller/obfuscated versions, announce holy jihads about your indenting style/white spacing, produce assembly language versions for various processor architectures, versions in LOGO, versions in JCL, etc... Thanks a bunch. :) JSR -- John S Russell | Big Geek | Doing geek stuff.
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.)
participants (6)
-
Daniel
-
J S Russell
-
Jeremy Brooking
-
Joe Abley
-
Joshua Brady
-
Steve Phillips