# This library is no longer being maintained, and is included for backward
# compatibility with Perl 4 programs which may require it.
# In particular, this should not be used as an example of modern Perl
# programming techniques.
# Suggested alternative: FileCache
# But only this sub name is visible to them.
if (++$numopen > $maxopen) {
local(@lru) = sort {$isopen{$a} <=> $isopen{$b};} keys(%isopen);
splice(@lru, $maxopen / 3);
for (@lru) { &close($_); delete $isopen{$_}; }
&open($file, ($saw{$file}++ ?
'>>' : '>') . $file)
|| die "Can't create $file: $!\n";
if (open(PARAM
,'/usr/include/sys/param.h')) {
$maxopen = $1 - 4 if /^\s*#\s*define\s+NOFILE\s+(\d+)/;
$maxopen = 16 unless $maxopen;