in reply to Zip Code Script
Randal has a point...
However, I see a use for a hash in the form of
My preferred method (TMTOWTDI) would be to keep an array of zips for an index and then a hash keyed by index with services.%hash{$zip$;service}
Have fun!foreach $ourzips (@zipcodes) { if ($userzip eq $ourzips) { $service = %hash{$userzip, service} ; } else { $service = "No service available. Loooooser!" ; } }
|
|---|