I am trying to pass two different arrays to subroutine in same file. First array @act_table is two dimentional array and another is simple array (@colm)

Below is my code :
for ($h=1; $h<=$arg[1]; $h++) { my @colm; for ($t=1;$t<=$arg[2];$t++) { push @colm, $act_table[$t][$h]; } Column(@act_table,@colm); } for ($i=1; $i<=$arg[2]; $i++) { for ($n=1;$n<=$arg[1];$n++) { #print" $table_arr[$i][$n]"; } } sub Column { no warnings; my @actcol=@_; my @col=@_; $colno++; print "In column : $colno\n"; foreach $_ (@col) { print "$_\n "; $_=~s/(<Tc(?:\s?\;?\s?\;?\d?)?>)(.*)/Entity_convert($2)/eg; $_= ThinSpace($_); #print "***************** $_\n"; } }

When i print @col trough foreach loop i get garbage values first and then actual values

This is really urgent. Can anybody please tell me what going wrong in my code?

Thanks in advance

In reply to Passing two arrays to a subroutine by gandhit

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.