if ($file_out =~ /^([\w][\w\._-]*)$/) { $file_out = $1; } else { print "Insecure file_out\n"; exit; }