in reply to Possible looping or syntax error
Feel free to ask any questions about this code. :)use strict; use warnings; use CGI qw(:standard); my %snailmail = ( Pam => 'pammy@foo.com', Sal => 'sally@bar.com', Tom => 'tom@there.com', ); print header,start_html('find it'); print start_form, p('Name: ', textfield('name')), p('Fetch: ', popup_menu('search',[qw(Exact All)])), p(submit('fetch')), end_form, ; if (param('fetch')) { if (param('search') eq 'Exact') { my $name = param('name'); my $email = $snailmail{$name}; if ($email) { print p("$name: $email"); } else { print p("'$name' not found in directory"); } } else { print p("$_: $snailmail{$_}") for sort keys %snailmail; } }
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
|
|---|