in reply to Database Rows into Perl Hash
Never mind, I found how to do it. Just modified the while loop a bit to look like this:
while( my( $comp, $bug_num ) = $sth->fetchrow_array() ) { if (($hash {$comp} eq '') ||($hash {$comp} == '' )) { $hash{ $comp }.=$bug_num; } else { $hash{ $comp}.=",$bug_num"; } }
Is there any other way to do it... specially as the saying goes >> TIMTOWTDI
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Database Rows into Perl Hash
by Athanasius (Archbishop) on Mar 07, 2015 at 12:37 UTC | |
|
Re^2: Database Rows into Perl Hash
by choroba (Cardinal) on Mar 07, 2015 at 12:42 UTC | |
|
Re^2: Database Rows into Perl Hash
by duelafn (Parson) on Mar 07, 2015 at 12:43 UTC |