for (@array){ if (++$cnt % 20 == 0){ print OUT "$_\n"; } else{ print OUT "$_ "; } }