http://qs1969.pair.com?node_id=1212107


in reply to Perl to run 2 files and print the third with loop

Like jimpudar I got the OP code to work with small changes. I am just a little worried that in jimpudar approach we are not checking for the possibility that @{ $ts{$timestamp} } might become empty which the code below checks:

while ( <FA> ) { ... while ( $tot-- and defined(my $id = shift @{ $ts{$timestamp} }) ){ print join(",",$life, $id, $cls )."\n"; } }
Ron