我有一個文件名logspath.txt,它包含在機器上的日誌目錄路徑中。每一行有一個目錄。儘管該目錄存在,但Perl說它沒有。 #!/usr/bin/perl -w
open FILE,"logspath.txt" or die $!;
while (<FILE>){
print $_;
opendir ($DIR,chomp($_)) or die $!;
當我運行
我有以下代碼 // Define the full path to your folder from root
$path = "../galleries/".$album;
// Open the folder
$dir_handle = @opendir($path) or die("Unable to open $path");
// Loop t