- or download this
$q{'command'} =~ /^(search|\s*)$/;
$command = $1; # $command is now untainted.
- or download this
defined $command && $command eq 'search' ? &search : &main; # gosh, I
+love the trinary operator :)
- or download this
while ($firstDisp < $lastDis) {...}
- or download this
use CGI;
my $q = new CGI;
- or download this
$q->param('command') =~ /^(search|\s*)$/; # untaint 'command'
my $command = $1; # $command is now untainted.