On Thu, 01 Aug 2002 21:54:01 +0200, Bart Lateur wrote: >As you might have guessed, especially since you're French, "fileno" stands >for "file number" (numero). The 5 you appear to be getting, is in fact an >ID for the file handle. For STDIN, you get 0, for STDOUT, 1, for STDERR, 2. >Do these numbers seem familiar? They might be.
Oh I see, the unix way. I should've thought. >As you're getting a 5, there must be at least 2 more files open. Here I got intrigued, cuz I only open one file. See this script: #!perl -w # test fileno # undef if closed, 5 if open use strict; $\ = "\n"; my $fil = 'foo'; open FIL, $fil or die ".. can't open $fil"; my $x = fileno FIL; print "x=$x"; print ".. $fil ", defined $x?"open":"closed"; 1; __END__ x=5 ... foo open What are those 2 hidden files 3 and 4 ? Merci for your clarifications. I'll be away through the 15th.