in reply to Referenced Hash

The problem is that you call the param() subs in list context, so they return an empty list (not undef) which then get flattened into "no element".

Assuming you expect max 1 argument per param(), you might try:

my $hash = { "file"=>shift(@params), "text"=>scalar param("lite"), "session"=> scalar param("session") };

if you really want to allow more than 1 argument per param(), you could put them in an anonymous array:

my $hash = { "file"=>shift(@params), "text"=>[ param("lite") ], "session"=> [ param("session") ] };

See also:

perldoc perldata perldoc CGI

-- Joost downtime n. The period during which a system is error-free and immune from user input.