http://www.perlmonks.org?node_id=1031765


in reply to Re: reading two files in parallel
in thread reading two files in parallel

This is a nice way to do it, however I would alaways advice against using $a and $b as variable names as they are "magic" names for sorts and bugs where your variables are then shadowed in a sort can be hard to track down, so better avoid potentially troublesome names.