Help for this page

Select Code to Download


  1. or download this
    # Regular CGI
    my $quantity = $q->param('quantity');            # Tainted
    
    # "Fancy" CGI of your own construction
    my $quantity = $q->SafeNumberParam('quantity');  # De-tainted
    
  2. or download this
    sub SafeNumberParam
    {
        my ($self)  = shift;
    ...
    
        return $number;
    }