develooper Front page | perl.macosx | Postings from September 2003

Perl wont open more than 254 files

Thread Previous | Thread Next
From:
James Reynolds
Date:
September 11, 2003 01:58
Subject:
Perl wont open more than 254 files
Message ID:
a05210608bb856d6ecbc1@[155.99.57.64]
I can't seem to get perl to open more than 254 files.  Is this a 
known limitation, or is it a bug?  I can't find any info other than 
Solaris had a similar problem (except it was 256 for Solaris) but is 
now fixed.

To test, I wrote this script that will generate 254 lines of "open 
(FILE... die...".  I copy the output of this script, paste it into a 
new script and execute the new script.  The output of the new script 
is at the bottom of this message.

#!/usr/bin/perl

$killer = 254;

print "#!/usr/bin/perl\n\n";
for ( $i=0; $i<$killer; $i++) {
  print "open (FILE$i, \"> test$i\") or die \"cant open $i \";\n";
}



Output:

cant open 253  at ./bla.pl line 256.

--

Thanks,

James Reynolds
University of Utah
Student Computing Labs
james@scl.utah.edu
801-585-9811

Thread Previous | Thread Next


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