Skip to content

Instantly share code, notes, and snippets.

@waffle2k
Created February 10, 2010 17:02
Show Gist options
  • Save waffle2k/300553 to your computer and use it in GitHub Desktop.
Save waffle2k/300553 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
# Finds all of the Received: lines in an email and spits out the
# epoch of each parsed line
use strict;
use Time::ParseDate; # libtime-modules-perl
while( <> ){
chomp;
last if /^$/;
next unless /^Received:/;
print parsedate( $1 ) . "\n"
if( /;(.+)/ );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment