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

Thanks for the reply bv. Actually, I didn't write the original code. I was assigned a quick fix task for removing the ampersand symbol. I would have thought replacing the symbol with an underline would elimate the false error alert. But, it didn't work as I am still getting the Error Message. It does label the filename as "cos.NEW" as is evident in the log file: *** OTIS data uploaded /usr/edi/cos.NEW Wed Aug 26 16:16:36 EDT 2009 *** 1 row created. I guess I am confused on why the scan and replace did not work.

  • Comment on Re^2: Removing a Metacharacter from a filename

Replies are listed 'Best First'.
Re^3: Removing a Metacharacter from a filename
by bv (Friar) on Aug 27, 2009 at 02:28 UTC

    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@$_;