Ajax Form Verify Demo

Enter color:  
Enter 4 digit number:
 
Enter 4 letter word:
 
Enter name:  

#### #!/usr/bin/perl # script to verify that value is a 4 digit number use strict; use CGI qw(:all); $|=1; # no I/O buffering my $number = param("number") || ''; print "content-type: text/html\n\n"; if ( $number =~ /\b\d{4}\b/ ) { print "

<-- OK

\n"; } else { print "

<-- ERROR: not a 4 digit number!

\n"; } ##
## #!/usr/bin/perl # script to verify that value is a 4 letter word use strict; use CGI qw(:all); $|=1; # no I/O buffering my $word = param("word") || ''; print "content-type: text/html\n\n"; if ( $word =~ /\b\w{4}\b/ ) { print "

<-- OK

\n"; } else { print "

<-- ERROR: not a 4 letter word!

\n"; }