in reply to Re: Re: Log parsing by timestamp dilema
in thread Log parsing by timestamp dilema

I have taken a quick look through the File::MergeSort code. Here are my suggestions about how to get the file names. In the constructor, there is a loop that opens the files and saves the file handles. I would add a line to save the file names too:
$self->{files}->[$n]->{fh} = $fh; $self->{files}->[$n]->{name} = $file;
In next_line, capture the value of $self->{sorted}->[0]->{name} when you read from the handle, and do an array return with both the line and the filename. That should do it.