in reply to Parsing mhtml attachment reports

"mhtml" is a common extension for files containing HTML::Mason components. What you've shown looks like plain ASCII text (which was probably produced using Mason), so just write something to parse out the information you're interested in from the text.

my( $ip, $date, @data ); my $seen_time_address_header = undef; while( <INFILE> ) { if( /address (\d+\.\d+\.\d+\.\d+\(.*\))/ ) { $ip = $1; } if( /Logins for (\S+)/ ) { $date = $1; } if( /^\s+Time\s+Address/ ) { $seen_time_address_header = 1; } if( $seen_time_address_header and /((?:\d+\.?){3})\s+(\S+)/ ) { push @data, [ $1, $2 ]; } }