At 10:34 am +1100 6/11/02, Ken Williams wrote:

#!/usr/bin/perl
$dir = "$ENV{HOME}/Library/Mail";
opendir DIR, $dir ;
for (readdir DIR) {
  /@/ and push @accounts, "$dir/$_\n"
}
$acc =  $accounts[0] ;
print $acc ;
### [EMAIL PROTECTED]
opendir ACC, qq~$acc~ or print "$!\n\n" ;
This line has the exact same problem as your last script did - readdir() returns RELATIVE directory paths, so you need to opendir(ACC, "$dir/$acc").
But $acc is already "$dir/$_", as the comment under the print.. line shows. Anyway, the path works fine in the shell, as my script also demonstrates.

JD


Reply via email to