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

Re: Zip Code Script

by HamNRye (Monk)
on Dec 13, 2000 at 01:22 UTC ( [id://46326]=note: print w/replies, xml ) Need Help??


in reply to Zip Code Script

Randal has a point...

However, I see a use for a hash in the form of

%hash{$zip$;service}
My preferred method (TMTOWTDI) would be to keep an array of zips for an index and then a hash keyed by index with services.
foreach $ourzips (@zipcodes) { if ($userzip eq $ourzips) { $service = %hash{$userzip, service} ; } else { $service = "No service available. Loooooser!" ; } }
Have fun!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-25 23:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found