ChrisR has asked for the wisdom of the Perl Monks concerning the following question:
However, the following code:#!c:\perl\bin\perl.exe -w use strict; use warnings; opendir(DIR, "c:\\") || die "can't opendir c:\\ ( $! ) \n"; my @rootlist = grep {/.*?/ && -d "c:\\$_" } readdir(DIR); closedir DIR; exit;
Produces this error:#!c:\perl\bin\perl.exe -w use strict; use warnings; use Win32::Perms; opendir(DIR, "c:\\") || die "can't opendir c:\\ ( $! ) \n"; my @rootlist = grep {/.*?/ && -d "c:\\$_" } readdir(DIR); closedir DIR; exit;
Line 8 is: opendir(DIR, "c:\\") || die "can't opendir c:\\ ( $! ) \n";Can't use string ("2") as a synbol ref while "strict refs" in use at t +est.pl line 8.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Strange problem with Win32::Perms
by BrowserUk (Patriarch) on Oct 05, 2003 at 04:59 UTC | |
by ChrisR (Hermit) on Oct 05, 2003 at 15:19 UTC | |
by BrowserUk (Patriarch) on Oct 05, 2003 at 15:44 UTC | |
by ChrisR (Hermit) on Oct 05, 2003 at 20:01 UTC | |
by Limbic~Region (Chancellor) on Oct 05, 2003 at 15:32 UTC | |
by ChrisR (Hermit) on Oct 05, 2003 at 19:14 UTC |