in reply to Merging 2 Formatted Files
To get all of the data, you'd do a SQL JOIN command on the name fields. It might end up something like 'SELECT * FROM location, instrument JOIN ON location.name = instrument.name'. (Untested and off the top of my head.)
If you'll be doing this sort of thing often, I would highly recommend a relational database, like MySQL or PostgreSQL. If you're looking for a way of doing the same thing without a real database, DBD::RAM is a pretty cool module that'll simulate it for you.
That said, fundflow's example is an easy simple hack (in a good way), that will do only what you've described and nothing more.
I wouldn't bother trying to hack in more complexity, though, as this is a case where there's an excellent, flexible, already-coded solution. (Besides that, learning a bit about SQL and DBI will make you a more valuable programmer.)
|
|---|