Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: Does anyone use underscore pseudo-filehandle?

by Rudif (Hermit)
on Oct 01, 2001 at 02:49 UTC ( #115768=note: print w/replies, xml ) Need Help??

in reply to Does anyone use underscore pseudo-filehandle?

Please be careful on Win32. I found out that testing for -T _ and -x _ may give erroneous result, depending on the order of tests. I believe this to be a bug in the Win32 Perl.

Here is a simple script to illustrate the problem:

#! perl -w use strict; my $file = 'test.bat'; print "1. $file is a text file, executable\n" if -T $file && -x _; print "2. $file is an executable text file\n" if -x $file && -T _;
Create a simple file named test.bat and run above script. It prints only this - not what I would expect
2. test.bat is an executable text file
See also this node and the replies: Problem with filetest -x _ on Win2k AS Perl build 626.


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://115768]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2023-12-06 16:46 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (30 votes). Check out past polls.