CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Array problem

 



kepler
Novice

May 24, 2011, 1:12 AM

Post #1 of 2 (1087 views)
Array problem Can't Post

Hi

I've got a script that searches a database and gives a result, something like this:

porto|1|38.783333|-9.2|PO|14||Porto|
porto|1|41.15|-8.616667|PO|17||Porto|
porto|1|39.066667|-9.033333|PO|14||Porto|
porto|1|42.016667|-8.45|PO|20||Porto|
porto|1|39.866667|-8|PO|06||Porto|

Also I have an array %codes in the form "PO14","Lisboa", "PO17","Porto", etc

When I join PO to 14 for example and go to $codes{"PO14} it matches - it gives me Lisbon region; but it will ignore the PO17; only the PO20 will be read and will ignore the PO06...

Does anyone has any idea why?

Kind regards, Kepler


rovf
Veteran

May 24, 2011, 6:14 AM

Post #2 of 2 (1080 views)
Re: [kepler] Array problem [In reply to] Can't Post

Maybe a bug in your program?

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives