Hullo all.

I'm new to perl and linux so if this is obvious to everyone else, I'll
apologize now and feel dumb in advance:

I'm attempting to output the contents of an array (in perl) into an HTML
page as a pull down list.

IOW: I want the array values to become options (as in <option>) in the
list.

Here's how I DID get output without using the pulldown <snip>:

my $i;
for ($i = 0; $i <= $#array_name; $i++){
        print "$array_name[$i]\n";
}

</snip>

THAT worked just dandy.
But when I attempt...<snip>:

my $j;
print "<form name="a_form">\n";
print "<select name="pull_my_finger" size=1>\n";

for($j = 0; $j <= $#array_name; $j++){
        print "<option>$array_name[$j]\n";
}

print "</select></form>\n";

</snip>

...it fails at me.

Is there a way around this besides embedding the script (and output)
midpage?

-Ed Glass


Reply via email to