while ( <> ) { print $a_counter, $b_counter if /a+b+/; }