The bit that's failing is the "for" inside the array ref — that just can't work. Besides, it looks like you might be trying to:
#!/usr/bin/perl
use warnings;
use strict;
use CGI;
my $cgi = CGI->new();
print $cgi->popup_menu(-name=>"Days", -values=>[ 1 .. 31]);
Although this isn't the correct way of doing it — you should use one of the
DateTime modules to get the number of days in the month (How many days are there in February 2000? February 2004? February 2100?)
davis
Kids, you tried your hardest, and you failed miserably. The lesson is: Never try.