客户那边突然冒个问题,要今天解决是个perl程序$IDPASS = $ARGV[0];
$SAVE_DIR = $ARGV[1] . '/saved';
$WORK_DIR = $ARGV[1] . '/in';
$IN_DATE = $ARGV[2];
$file1 = "ls.lst";
$call_unix = "ls -t $WORK_DIR/*.txt > $WORK_DIR/$file1";
system($call_unix);
open(IN,"$WORK_DIR/$file1")
  || die "cannot open input file";
  @in_data=<IN>;
close(IN);
foreach $tmp (@in_data)
{
chop($tmp);
print "1";
print "\n$tmp\n";
$tar_relative_filename=substr($tmp,30);$txtfile_dir = substr($tmp,0,rindex($tmp,'/')+1);
  $filename= substr($tmp,rindex($tmp,'/')+1);$sqlexec = '@cws_loadstaged.sql';
$call_c = "sqlplus -s $IDPASS $sqlexec $txtfile_dir $filename $IN_DATE";
system ($call_c);
}  现在有个很奇怪的问题 如果通过执行perl 调用'@cws_loadstaged.sql' 就会报BEGIN cws_loadstaged.cws_stage('/ouc/oucdev/adm/ftp/cws/in/', 'CC.EDS01.txt', '14-JUN-2010'); END;*
ERROR at line 1:
ORA-29280: invalid directory path
ORA-06512: at "SYS.UTL_FILE", line 18
ORA-06512: at "SYS.UTL_FILE", line 424
ORA-06512: at "CWS.CWS_LOADSTAGED", line 55
ORA-06512: at line 1
但是我直接 SQL> exec cws_loadstaged.cws_stage('/ouc/oucdev/adm/ftp/cws/in', 'CC.EDS01.txt', '14-JUN-2010');
就没错  perl程序执行到调用oracle的包的前面是没问题的,就是通过perl调 就出错。直接执行,参数都一样 就不会错帮帮!!!