Justin du Coeur (jducoeur) wrote,
Justin du Coeur
jducoeur

  • Mood:

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...
Tags: programming
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 10 comments