看板 Perl 關於我們 聯絡資訊
寫了一個從檔案讀取2.txt的字元來建立目錄如下: #!/usr/bin/perl -w unless (open(INFILE, "2.txt")) { die ("cannot open input file file:$^E\n"); } $line=<INFILE>; while ($line ne "") { mkdir ($line) or warn "Cannot opendir :$^E\n"; $line=<INFILE>; } -------------------------------------------------- 當我執行時 ,Cannot opendir :檔案名稱、目錄名稱或磁碟區標籤語法錯誤。 有人可以告訴我哪裡錯了嗎? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 125.224.56.184
cibs:你 2.txt 裡面放什麼? 11/04 00:58
s1106:中文字元 11/04 07:39