Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Searching text files

by Tanktalus (Canon)
on Sep 14, 2006 at 18:24 UTC ( [id://572969]=note: print w/replies, xml ) Need Help??


in reply to Searching text files

Combining the above two great ideas, I would suggest not just a straight-forward database, but I would also split up the numbers into area code, exchange, extention. (And, if you want, country code - but sounds like you're just dealing with the US, so this would always be '1'.) This would allow the database to also set up indexes on area code and exchange for faster lookups. Ok, you have to tell the database to create indexes, but then you'll be able to do so.

Replies are listed 'Best First'.
Re^2: Searching text files
by demerphq (Chancellor) on Sep 15, 2006 at 10:38 UTC

    Off Topic a Bit

    Area codes, exchanges and extensions are US/Canada/Carribean concepts. Very few other areas use them. Germany for example uses over four thousand prefixes to represent local dialing zones, but they are not analagous to exchanges nor to area codes (and are of variable lengths). If you design your software with 3-3-4 in mind your software isnt going to work anywhere else in the world except maybe Switzerland (who use the NA system internally). My own telephone number is 11 digits for instance, and thats NOT including the country code. I know of peope who entire number is only 6 digits.

    I would say that indexing based on the full CLI is the best, and most portable.

    ---
    $world=~s/war/peace/g

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://572969]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2024-03-28 13:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found