jducoeur: (Default)
jducoeur ([personal profile] jducoeur) wrote2006-11-25 07:13 pm
Entry tags:

I hate Perl. Hate it, hate it, hate it...

Okay, all of you Perl aficionados who keep telling me what a nice language it is. I have a question for you. I'm trying to write a dirt-simple program to parse an input form using the standard CGI library on Unix. My code looks something like this:


use CGI qw(:standard) ;

$query = new CGI;

my $age = $query->param('age');
my $params = $query->Vars;
my $age2 = $params->{'age'};
print $query->Dump();


Why, prithee tell, do the first two versions (both taken directly from the CGI documentation) keep insisting that $age and $age2 are empty strings, despite the dump quite happily showing that the age parameter is being passed in as expected? This damned language is so opaque (and the documentation so miserable) I'm at a dead end even trying to figure out where the data is hiding...

Post a comment in response:

(will be screened)
(will be screened if not validated)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting