my $price = "100.09"; if ($price =~ / ^ # We begin at the start of the string [0-9]+ # At least one digit, possibly followed by more ( # Then (possibly, see below) follows \. # a dot [0-9][0-9] # and two more digits )? # But the decimal part is optional $ # And that's all there is to be /x) { } elsif { die "'$price' dosen't look like a valid price.\n" }; #### /^([0-9]+(\.[0-9]{2})?)|(\.[0-9]{2})$/ #### 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