in reply to Reorganising a Hash for Output
1, a 1, b ... 3, h 3, i
add this line right after the print statement:print "$key, $value\n";
Then, after that loop is done, just do:push( @secondOutput, "$value, $key" );
(the "" after the sort is so that join() will add a linefeed after the last array element).print join( "\n", sort( @secondOutput ), "" );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Reorganising a Hash for Output
by arunhorne (Pilgrim) on May 07, 2002 at 13:43 UTC |