in reply to mail::sendmail with an array of hashes

This chunk of code:
# change normal array separator my $foo = $"; $" = "\n"; print FH "@head"; $" = $foo; # change back
could be replaced with:
{ local $" = "\n"; print FH "@head"; }
Using local removes the need for a temporary variable, as the saving and restoring of the previous value of the global $" variable is taken care of for you.

See local, the "Temporary values via local()" and "When to still use local()" sections of perlman:perlsub, and for a more detailed explanation and examples, see brother Dominus's Seven Useful Uses of local.

-sacked