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")In reply to (tye)Re: Confused about complex data structures.
by tye
in thread Confused about complex data structures.
by r.joseph
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |