while ( defined ( $_ = <DATA> )){
is equivalent to
while ( <DATA> ){
$c > 1 ? print $fh2 "$k\t$_\n" : print $fh1 "$k\t$_\n";
is equivalent to
print { $c == 1 ? $fh1 : $fh2 } "$k\t$_\n";
or do
my $fh = $c == 1 ? $fh1 : $fh2;
outside the loop and print to $fh.
In reply to Re^2: select only duplicate entries
by ikegami
in thread select only duplicate entries
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |