#!/usr/bin/perl #Some code to read arguments passed to the script #Read STDIN (GET & POST) into %input hash if ($input{'file'} !~ /^\// && $input{'file'} !~ /\.\./) { open FILE, ">/home/user/www-root/users/files/$username/$input{'file'}" or die "Error opening file!"; print FILE $input{'file_contents'}; close FILE; } else { #produce some error denying access to this file }