Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#More code is here, this is just to explain my problem... $sth->execute() || die $sth->errstr; while (my $pointer = $sth->fetchrow_hashref){ $N_NUM = &cleaner ($pointer->{'number'}); push @array,$N_NUM; &total(@array); #Print HTML print "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpaddin +g=\"0\"> <tr> <td width=\"15\"> </td> <td class=\"textgreyb\">Products</td>"; # My problem is here cause I can only get the value of this varialbe $ +results when I have send the array @array to the SUB TOTAL + &total; print " <td class=\"textgreyb\">$results</td> </tr>"; } End while sub total { my $all_info = shift (@_); # gets values passed by @array, it has all +the Numbers found on DB my @info = split/ /,"$all_info"; # It checks a DB table and if the number is found here it should send +back a value of "FOUND" or "NOT FOUND" code would go here getting the values in here is not a problem... ok, let say that my final result is; my $results="FOUND"; return; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sub routine processing issue, HELP!!!!!
by dragonchild (Archbishop) on Dec 08, 2004 at 20:59 UTC | |
|
Re: Sub routine processing issue, HELP!!!!!
by Joost (Canon) on Dec 08, 2004 at 20:42 UTC | |
by dazzle (Sexton) on Dec 08, 2004 at 22:52 UTC | |
by Anonymous Monk on Dec 08, 2004 at 20:51 UTC | |
|
Re: Sub routine processing issue, HELP!!!!!
by friedo (Prior) on Dec 08, 2004 at 20:47 UTC | |
| |
|
Re: Sub routine processing issue, HELP!!!!!
by nedals (Deacon) on Dec 09, 2004 at 00:34 UTC |