Help for this page

Select Code to Download


  1. or download this
    my $rpt_id = $CGI->param('rpt_id');
    
    ...
    unless ($rpt_id =~ /^\d+$/) {
        # handle error - id contains more than digits
    }
    
  2. or download this
    #!/usr/local/bin/perl5_8 -T
    
  3. or download this
    my $rpt_tmpl = "cnc1_rpt" . $rpt_id . "_summary.tmpl";
    
    ...
    
    # and yet anther way
    my $rpt_tmpl = sprintf("cnc1_rpt%d_summary.tmpl", $rpt_id);
    
  4. or download this
    my $file = $CGI->param('file');
    open FH, '<', "$PATH/$file";