in reply to sendmail logging combine two hashes

You could combine your data into one hash %msg when you read the file instead of creating two hashes:

$msg{$msgid}{'to'} = $destname; $msg{$msgid}{'from'} = $fromname;

Replies are listed 'Best First'.
Re^2: sendmail logging combine two hashes
by chanslor (Acolyte) on Feb 18, 2015 at 12:32 UTC
    Thank you! I'm looking at Data::Dumper to figure how to print!

      Try

      for my $m (keys %msg) { print "$m $msg{$m}{to} send message from $msg{$m}{from}\n"; }
        Wow, Thanks so much!!! The output is just what I wanted!!!