ImpalaSS has asked for the wisdom of the Perl Monks concerning the following question:
I needed the $i in there, as a counter to ensure that the second two variables getting sent to the subroutine are the correct ones. When i actually print out the lines that are sent to the subroutine using$i=0; $index=@netids; print "<TABLE>"; foreach $id(@netids){ print"<td>"; print "<pre>"; PRINT_INFO ($id,$nums[$i],$sects[$i]); print "</pre>"; $i++; }
i get this..print "PRINT_INFO ($id,$nums[$i],$sects[$i])";
So i know the data being sent to the subroutine is complete and correct. This is how the sub routine parses the dataPRINT_INFO (2515,0040,1) PRINT_INFO (9479,0040,2) PRINT_INFO (2529,5228,1) PRINT_INFO (9198,5228,2) PRINT_INFO (9399,5458,1) PRINT_INFO (12344,0473,3) PRINT_INFO (14119,5335,1) PRINT_INFO (14120,5335,2) PRINT_INFO (14248,0267,3) PRINT_INFO (19341,0314,1) PRINT_INFO (19343,0314,3) PRINT_INFO (19332,5268,1) PRINT_INFO (19333,5268,2)
Now, from the actual data that the subrourine prints, the data itself is correct. However, the titles are not, it prints the same title a few times, or goes out of order, all kinds of wierd stuff, but the actual data, is correct.my ($netid, $sitename, $sector) = @_;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re (tilly) 1: Foreach Complications
by tilly (Archbishop) on Dec 07, 2000 at 19:35 UTC | |
by $code or die (Deacon) on Dec 07, 2000 at 20:56 UTC | |
|
Re: Foreach Complications
by kilinrax (Deacon) on Dec 07, 2000 at 19:15 UTC | |
by ImpalaSS (Monk) on Dec 07, 2000 at 19:35 UTC | |
by arturo (Vicar) on Dec 07, 2000 at 20:16 UTC | |
by dws (Chancellor) on Dec 07, 2000 at 22:29 UTC | |
by kilinrax (Deacon) on Dec 07, 2000 at 20:31 UTC | |
by jeffa (Bishop) on Dec 07, 2000 at 22:18 UTC | |
|
Re: Foreach Complications
by arturo (Vicar) on Dec 07, 2000 at 19:16 UTC |