in reply to Populating data from one file to another file

Rather than manually parsing and merging the files, I would suggest looking at DBD::CSV or, at a minimum, any of the CSV parsing modules on CPAN.

As an example, you could use Text::CSV to read file 1. For each line in file 1, extract the supervisor's ID, then use DBD::CSV and SQL to locate the supervisor's name in file 2. Write the output to a new file.

Hope this gets you started...

  • Comment on Re: Populating data from one file to another file

Replies are listed 'Best First'.
Re^2: Populating data from one file to another file
by rycher (Acolyte) on May 01, 2009 at 05:05 UTC
    Huzzah!

    Thank you for the advice...

    I found a way to make MySQL output the info with an INNER JOIN and an alias.

    It's quicker and more reliable than my coding anyway.

    Thanks!