in reply to Foreach loop not working within Mail

You need to move the 'EOM' marker up above the foreach loop.... Something like:
print SENDMAIL <<"EOM"; [snip] Sample from the firewall logs: EOM for (@fwlog) { [snip] print SENDMAIL $_; }
As you have it written, the foreach loop is within the here doc. This is not what you want. End the here doc before the loop, then use the loop to print out the rest of the data.

-Blake