S
shade
Greetings.
I am learning Perl, to enhance shell programming and generate web based
internal applications. I've been using CGI.pm, which is really nice.
However, I still find myself using <<HERE statements fairly often. Here is
what I am doing...
print $q->start_form;
print "<select name='order'>;
foreach $h in ( @heading ) {
print "<option>$h</option>";
}
print "</select>";
print $q->submit( -name=>'asc' -value=>'Ascending' ),
print $q->submit( -name=>'desc' -value=>'Descending'),
etc., etc.
I'm having trouble using a "scrolling_list" because of the foreach logic
that retrieves data for the drop down. Is there any way to do this in
CGI.pm, such as...
print $q->scrolling_list( -name=>'order' -value=>[
foreach ... ... ...
] ),
Or; would I be better off just using my own straight HTML when running
through logic. The script is working fine as is, I'm just trying to learn
how to do this the best way I can. i.e. with warnings, strict, taint and the
CGI.pm HTML parser.
Regards,
Shade
I am learning Perl, to enhance shell programming and generate web based
internal applications. I've been using CGI.pm, which is really nice.
However, I still find myself using <<HERE statements fairly often. Here is
what I am doing...
print $q->start_form;
print "<select name='order'>;
foreach $h in ( @heading ) {
print "<option>$h</option>";
}
print "</select>";
print $q->submit( -name=>'asc' -value=>'Ascending' ),
print $q->submit( -name=>'desc' -value=>'Descending'),
etc., etc.
I'm having trouble using a "scrolling_list" because of the foreach logic
that retrieves data for the drop down. Is there any way to do this in
CGI.pm, such as...
print $q->scrolling_list( -name=>'order' -value=>[
foreach ... ... ...
] ),
Or; would I be better off just using my own straight HTML when running
through logic. The script is working fine as is, I'm just trying to learn
how to do this the best way I can. i.e. with warnings, strict, taint and the
CGI.pm HTML parser.
Regards,
Shade