kepler has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem with array
by Corion (Patriarch) on May 24, 2011 at 08:13 UTC | |
by kepler (Scribe) on May 24, 2011 at 08:54 UTC | |
by Corion (Patriarch) on May 24, 2011 at 09:11 UTC | |
by Bloodnok (Vicar) on May 24, 2011 at 09:59 UTC | |
|
Re: Problem with array
by rovf (Priest) on May 24, 2011 at 13:59 UTC | |
by dreadpiratepeter (Priest) on May 24, 2011 at 16:41 UTC |