sub To_header { my $ff; my $iz; open($ff,">hr.txt"); for ($iz=0;$iz<=$temp[0];$iz++) { print $ff "$words[$iz]" ; } }