descartes has asked for the wisdom of the Perl Monks concerning the following question:
Brothers and Sisters: This may be dismissed as a stupid newbie error, but I have a problem that my own resources have yet to resolve.
Essentially, I have a subroutine that is pulling in data from a mysql database, returing things that match in an array, counting the matches, and then returning both the array and the count. Basically, here's how it looks now:
(@ary1, $num) = read_data(\@tmpary, $tmpsclr); ... sub read_data { ... do stuff with @retary and $count return @retary, $count; }
I have been all over in the Holy Camel Book, and the most I can find is info about returning multiple hashes or arrays, and nothing regarding an array and a scalar together. Any help would be appreciated.
Brother Descartes
-- Programmus, ergo sum.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Arrays and Scalar Parameters
by VSarkiss (Monsignor) on Aug 20, 2001 at 22:44 UTC | |
|
Re: Arrays and Scalar Parameters
by Sifmole (Chaplain) on Aug 20, 2001 at 22:36 UTC | |
|
Re: Arrays and Scalar Parameters
by ozone (Friar) on Aug 20, 2001 at 22:44 UTC | |
|
Re: Arrays and Scalar Parameters
by kjherron (Pilgrim) on Aug 20, 2001 at 22:49 UTC | |
|
Re: Arrays and Scalar Parameters
by IraTarball (Monk) on Aug 20, 2001 at 22:51 UTC | |
|
Re: Arrays and Scalar Parameters
by Cine (Friar) on Aug 20, 2001 at 22:54 UTC | |
|
Re: Arrays and Scalar Parameters
by descartes (Friar) on Aug 20, 2001 at 23:20 UTC | |
|
Re: Arrays and Scalar Parameters
by dga (Hermit) on Aug 21, 2001 at 00:04 UTC | |
by descartes (Friar) on Aug 21, 2001 at 00:08 UTC | |
|
Re: Arrays and Scalar Parameters
by John M. Dlugosz (Monsignor) on Aug 21, 2001 at 08:01 UTC |