in reply to Tie::Handle::CSV dynamically detecting header names
Instead of trying to figure out the headers and formatting on the fly, you should probably prep the header row. For example, load the file, read the header line and then make it all lowercase and save it somewhere. Then use the new file for processing in your script.
A lot of places spend time prepping/formatting data before they actually process it. It is a great place to catch errors that might otherwise be overlooked. As for the guy changing 'City' to 'Country' well there are limits on what you can be expected to do. Garbage In will result in Garbage Out.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Tie::Handle::CSV dynamically detecting header names
by Marshall (Canon) on Mar 25, 2009 at 17:25 UTC |