![]() |
|
The stupid question is the question not asked | |
PerlMonks |
Foreach Complicationsby ImpalaSS (Monk) |
on Dec 07, 2000 at 19:05 UTC ( #45505=perlquestion: print w/replies, xml ) | Need Help?? |
ImpalaSS has asked for the wisdom of the Perl Monks concerning the following question:
Hello, I have yet another problem. I am in the process of writing a script. What this script does for the engineers here, is when they select a site (cgi) and click submit, the script gathers a table of information for that site, along with all of its neighbors. How i did this was, i used a preexisting script that i wrote, which actually parsed the data, and made it a subroutine. I then made an array, which had every "netid" for the neighbor sites. The subroutine, takes the "net-id" and selects the data, but it also has 2 more variables, which is where my problem arrises. See the other 2 variables are simply used to title the column produced by the subroutine. So this is how i did it. I have 3 arrays, one with the netids (crucial for the data) one with the siteid(used for title) and one with the sector number (again, used for title). The for each loop is: 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 get this.. So i know the data being sent to the subroutine is complete and correct. This is how the sub routine parses the data 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. Thanks In Advance Dipul
Back to
Seekers of Perl Wisdom
|
|