Re: [perl #46463] filetests sometimes do not set _ On 17/10/2007, Mark Overmeer  wrote:
> Hum... the error report was even more right than I expected it to be...
> After a long bug-hunt, I figured out that it is not '-w' itself which
> is misbehaving (the file test flags), but it is the module 'filetest'.
>
> The following script reports 'directory' twice:
>
>    #!/usr/local/bin/perl5.10.0
>    use filetest 'access';
>
>    -d '/etc';
>    -w '/etc/passwd';
>    warn -f _ ? "file\\n" : "directory\\n";
>    warn -d _ ? "directory\\n" : "file\\n";
>
> Apparently, -r/-w/-x/-R/-W/-X implemented in filetest to not
> set '_' anymore, where they did so in perl5.8.8

Looking at the code, I think this bug was already present in 5.8.x.
But maybe the access code wasn't compiled in your version.

What does
perl -V:.*access.*
show for each of your perls ?


