develooper Front page | perl.perl5.porters | Postings from July 2003

-T $filehandle doesn't work properly?

From:
Ken Williams
Date:
July 21, 2003 08:04
Subject:
-T $filehandle doesn't work properly?
Message ID:
905EA083-BB8C-11D7-B0BB-003065F6D85A@mathforum.org
Hi,

I've run the following test with both 5.6.1 and 5.8.0 on Mac OS X, and 
it looks like -T $filehandle is returning different results (and 
incorrect ones at that) than -T $filename.

----------------------
% echo foo > file
% perl -le 'print 0 + -T "file"; open $fh, "file" or die $!; print 0 + 
-T $fh'
1
0
----------------------

(I added zero for "clarity".)

I haven't tested the current 5.8.1 release candidate.

I'll add to perlbug unless someone has a good explanation.

  -Ken




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About