select this for answer:opendir(DIR,'/') || die "$!"; my @files=readdir(DIR) || die "$!"; closedir(DIR) || die "$!"; print join "\n", @files;
| || has a higher precedence than = |
| (my @files=readdir(DIR)) || die “$!”; |
| .....works just fine |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Precedence (spot the bug)
by Chmrr (Vicar) on Oct 22, 2001 at 05:07 UTC | |
|
Re: Precedence (spot the bug)
by Arguile (Hermit) on Oct 22, 2001 at 05:16 UTC | |
|
Re: Precedence (spot the bug)
by kschwab (Vicar) on Oct 22, 2001 at 05:09 UTC |