The Second Rule of Taint Club 

my $filename = $ARGV[0];             # $filename is tainted

if($filename =~ /^([a-z]+)$/i) {
    $filename = $1;                  # $filename is not tainted
}
else {
    die "only letters allowed in filename";
}