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
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|