in reply to Confused about complex data structures.
Personally, I suggest you run your script under "perl -d" and step through your code and occasionally enter the command "x \%city_data" to see what you've done.
I'd say the worst part of your current code is the open() because the die message should include $filename and $! and you should at least open "< $filename" so that special characters in $filename are less problematic.
I don't see any other serious problems.
- tye (but my friends call me "Tye")
|
|---|