I have 8 csv files that need to be archived and emailed to 8 different addresses once a dayExplain this a bit more? You have 8 CSV files -- do they all go to each of the 8 addresses, or is there a correspondence between each CSV file and a particular address?
For example, let's say the CSV files are named a.csv, b.csv, et cetera. Your first recipient is john_q_public@foobar.com. Does he get all 8 csv files? Only a.csv? Some subset (i.e., John needs a.csv, d.csv, and f.csv, but no others)? The answer to that will change how to approach the hash.
Unrelated to the hashes, you can simplify part of your code. Specifically, the sys_date sub can be replaced by POSIX::strftime. At the top of your script add use POSIX then the sys_date sub call can be replaced with something like:
$file_date = POSIX::strftime("%b%d%Y", localtime);
See strftime docs for all of the available formats.
In reply to Re: Appending to filenames, system mv, using MIME::Lite and other fun
by Nkuvu
in thread Appending to filenames, system mv, using MIME::Lite and other fun
by hmbscully
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |