On Tue, Nov 05, 2002 at 09:26:01PM +0000, John Delacour wrote: > I've a feeling I'm doing something silly here, but I can't work out > what it is. In the shell I can list the contents of a Mail.app > account package, but perl will not recognise the package as a > directory. Do I need to use some other syntax or is it simply > impossible?
What's that extra "\n" doing on the end of each element of the @accounts array? It'll be still present when you try to use the element to open up the directory, leading to a "file not found" error. So either strip that or just change the line $acc = $accounts[0] ; to read chomp($acc = $accounts[0]); and you should be fine. Cheers, Paul