in reply to Merging SQL Results
I've assumed that the first column is some kind of key, and treated the results as an array of arrays. Hope this makes some sense!foreach $result (@result_1) { $resultHash {${$result}[0]} = ${$result}[1]; } foreach $result (@result_2) { if (defined ($resultHash {${$result}[0])) { print "${$result}[0] , $resultHash[1]"; } else { print " -- --"; } print "${$result}[0] , ${$result}[1]\n" }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Merging SQL Results
by johnirl (Monk) on Aug 05, 2002 at 08:40 UTC | |
by physgreg (Scribe) on Aug 05, 2002 at 09:49 UTC |