for my $item( @FORM{ qw/Comments addr name/ } ){ if( $item =~ m/http|html|A HREF/i) { &html_message; } }