sub has_vertical_bar { my ($string) = @_; return $string =~ /\|/; }; # ... later, in your code ... my @parameters = qw(name site siteid email pass aim yahoo icq msn location intrests ); my $errormsg = ""; foreach my $parameter (@parameters) { if has_vertical_bar($q->param($parameter)) { $errormsg ||= "There was some problem with your input. Please make sure no fields have vertical bars."; $errormsg .= "I found a vertical bar in the field $parameter. "; }; }; error($errormsg) if ($errormsg); #### perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web