in reply to Confusion about an empty array

There are two probelms with your open statement: it should be opendir and you are missing a path separator:
foreach my $client (@client_directories) { opendir(C_DIR, "$base_directory/$client") or die "Could not open c +lient directory $base_directory/$client: $!\n"; my @config_directories = grep { $_ ne '.' and $_ ne '..' } readdir + C_DIR; close C_DIR; print "@config_directories\n";

-Mark

Replies are listed 'Best First'.
Re: Re: Confusion about an empty array
by ctilmes (Vicar) on Apr 24, 2004 at 10:22 UTC
    three problems: Should use closedir instead of close too.