in reply to Re^2: Appending to filenames, system mv, using MIME::Lite and other fun
in thread Appending to filenames, system mv, using MIME::Lite and other fun

In that case you can create a simple lookup. Something akin to (using my previously named examples):

my %csv_recipients = ( 'john_q_public@foobar.com' => 'a.csv', 'jane_q_public@xyz.com' => 'b.csv', 'some_other_address@example.com' => 'c.csv' # and so on );

Then to send it out just change your call to archive_results:

while (my ($recipient, $filename) = each %csv_recipients) { archive_results($recipient, $orig_file, $filename, $subject); }
or similar. Code untested, void where prohibited by law, et cetera et cetera ad nauseum.