Help for this page

Select Code to Download


  1. or download this
    @files = <*.c>;             # insecure (uses readdir() or similar)
    @files = glob('*.c');       # insecure (uses readdir() or similar)
    
    # In either case, the results of glob are tainted, since the list of
    # filenames comes from outside of the program.
    
  2. or download this
    #!perl -T
    
    ...
            # run is(...) test with $name here
        }
    }
    
  3. or download this
            my $tainted_name = join '_', $prefix, split //, $suffix;
            $tainted_name =~ /^(.+)$/;
            my $name = $1;
            # run is(...) test with $name here