$script=$ARGV[3]; # Value of this $ARGV is NEW&OLD : : $otis_db="$base_dir/otis_db/cos.$script.$cdate.$pid"; : : : : chomp($end_date=`date +%m/%d/%Y_%T`); $end_date=~s/_/ /g; $values="(\'$file_name\',\'$send_from_dir\',\'$serv_ref\',TO_DATE\(\'$end_date\',\'MM\/DD\/YYYY HH24:MI:SS\'))\;"; : I placed this line right before the echo statement. Was getting an error could not upload " cos.NEW&OLD.082609.12345" because it could not be found. But it did create the file "cos.NEW". The & and anything after is ignored. $script=~s/(\W)/_/g; : `echo "INSERT into COSBRIDGE\n\tvalues$values\n" >> $otis_db`;