make directory
I am currently working on a PL file. where i encounter some errors.
I am trying to create a dir if it is not available :
########################
22 FILEPATH = '/trs/wg/'.$ToDate.'/';
23 print "Filepath is $FILEPATH\n";
24 #CURDIR = $FILEPATH;
25 if [ ! -d $FILEPATH ];
26 then
27 mkdir $FILEPATH
28 fi
########################
The error was :
Can't modify constant item in scalar assignment at printfile.pl line 22, near "'
/';"
syntax error at printfile.pl line 25, near "if ["
Semicolon seems to be missing at printfile.pl line 27.
printfile.pl had compilation errors.
Anyone can help me?
|