for ($h=0; $h<=$arg[1]-1; $h++) { my @colm=""; for ($t=0;$t<=$arg[2]-1;$t++) { push @colm, $act_table[$t][$h]; print "***##$act_table[$t][$h]\n"; } Column(\@act_table,\@colm); } } Alnfirstcol (@firstcol); ## Sends first column for alignment to Subroutine Alnfirstcol #foreach my $item (@firstcol) { #print "$item \n"; #} ## Subroutine : Entity_conv ## Sends cellwise data to Entity module to convert entities ## After entity conversion sends cellwise data ThinSpace subroutine to add thin space wherever required ## Sends column to Text_Nontext subroutine to evaluate whether column is contains text data or non text data sub Column { no warnings; my $actcol=shift; my $col=shift; $colno++; foreach (@$col) { print "$_\n"; $_=~s/(<(?:Tr|Tc)(?:\s?\;?\s?\;?\d?)?>)(.*)/$1.Entity_convert($2)/eg; } foreach (@$col) { #print "After ## $_\n"; } ThinSpace(\@$col,\@$actcol); return (); }