#!/usr/bin/perl -T use strict; use warnings; # snipped directly from CGI.pm # $val comes from (tained) URL parameters this this case # I'm using command line input to provide tainted test input my $val = \@ARGV; for my $fh (grep {defined(fileno($_))} @$val) { seek($fh,0,0); # reset the filehandle. }