in reply to Re^2: Removing a Metacharacter from a filename
in thread Removing a Metacharacter from a filename

Well, if you still need to use the scan-and-replace method, you need to move it up before this line:

$otis_db="$base_dir/otis_db/cos.$script.$cdate.$pid";

Since after that, any changes to $script do not affect the $otis_db variable, which is what gets used to create the file.

$,=' ';$\=',';$_=[qw,Just another Perl hacker,];print@$_;