$_=param('nameoffile');
tr/a-z//cd;
print ">$_";
if (!(open (OUT, ">$_"))) { print "Error opening file $_
for writing."; exit 0; }
why are you using $_ to store a file name anyway ??
try using a declared variable for storing the file name
that will work