You probably want to enforce scalar context on the expression.
my %hash = ( 'formval1' => scalar gParam('formval1'), 'formval2' => scalar gParam('formval2') );
See also Want.pm.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: Hash equivalent of wantarray?
by davorg
in thread Hash equivalent of wantarray?
by fs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |