use perlfunc:ref to see if the value of $somehash{"$foo$bar"} is an arrayref. If it isn't, then create it.
unless ( ref ($somehash{"$foo$bar"} eq 'ARRAY' ) { $somehash{"$foo$bar"} = []; } ...
HTH
Philosophy can be made out of anything. Or less -- Jerry A. Fodor
In reply to Re: push onto hash!
by arturo
in thread push onto hash!
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |