Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Does anyone use underscore pseudo-filehandle?

by Rudif (Hermit)
on Oct 01, 2001 at 02:49 UTC ( [id://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.

Rudif

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-04-19 22:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found