#!/usr/bin/perl -w use strict; use CGI; my $q = new CGI; # print a header print $q->header; # get param value using CGI ie <input type="text" name="param_name"> my $input = $q->param('param_name'); print "<h3>Test</h3>\n"; print "<p>'$input' is alphanumeric</p>" if $input =~ m/^[a-zA-Z0-9_'-] ++$/; print "<p>'$input' is integer</p>" if $imput =~ m/^\d+$/;
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: Checking input
by tachyon
in thread Checking input
by skirrow
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |