in reply to Unexpected Hash Assignment using cgi->params

In list context, when the key isn't present, the param method returns an empty list rather than undef. Put the param calls in scalar context and all will be well:

use CGI; my $cgi = CGI->new( user_name => 'foobat' ); my %data = ( email => scalar( $cgi->param('user_email')), name => scalar( $cgi->param('user_name')) ); print "@{[keys %data]}\n"; __END__ email name
Can you save yourself some work by looping over the params list and deriving your key names by substr or substitution?

After Compline,
Zaxo