in reply to array of hashes
%one = { 1 => 'mili', 2 => 'brown', 3 => 'kalu' };Wrong. You should decide on whether you want to use a hash, in which case you must use normal parens; or a hash ref, in which case you can the curly braces. Thus, choose between:
and%one = ( 1 => 'mili', 2 => 'brown', 3 => 'kalu' );
Note that %one and $one are not the same variable, and you use them differently. So you have to adapt the rest of your code to this choice.$one = { 1 => 'mili', 2 => 'brown', 3 => 'kalu' };
I see you've made this same mistake several times in your code.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: array of hashes
by AnomalousMonk (Archbishop) on Feb 10, 2011 at 21:55 UTC |