I'm not perl expert but it looks like you have mixed shell scripting with perl code.
Okay first try to replace line 22
Code:
22 FILEPATH = '/trs/wg/'.$ToDate.'/';
with
Code:
FILEPATH = "/trs/wg/".$ToDate."/";
and then if command as follows:
Code:
25 if [ ! -d $FILEPATH ];
26 then
27 mkdir $FILEPATH
28 fi
with
Code:
if ( ! -d $FILEPATH ){
mkdir($FILEPATH, 0755) || die "Cannot mkdir newdir: $!";
}
Since file extension is .pl (perl) and code seems like perl I'm assumed that it is perl code. If you wanna shell script code then it again need to modify
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!
If you have knowledge, let others light their candles at it.
Certified to work on
HP-UX /
Sun Solaris /
RedHat