I have the following code that is trying to associate arrays with files. In addition, when I run this code, it only creates 2045 files. What is the problem?
#!/usr/bin/perl use Tie::File; for (my $i = 0; $i < 10000; $i++) { @files{$i} = (); tie @{$files{$i}}, 'Tie::File', "files//tiefile$i"; }
Edit: I'm on windows
You accumulate open file descriptors (see. ulimit -n, / ), And you will eventually reach the limit of open file descriptors to 2048 (2045 + + + .)setrlimit RLIMIT_NOFILERLIMIT_OFILEstdinstdoutstderr
ulimit -n
setrlimit
RLIMIT_NOFILE
RLIMIT_OFILE
stdin
stdout
stderr
Windows , 2048 , 2048 - ( ) MSVC stdio.
stdio
Linux /etc/security/limits.conf
/etc/security/limits.conf
* soft nofile 10003 * hard nofile 10003
, 10003 (, : stdin, stdout stderr).
, Win32. , , , fork 'ing ( Win32).
fork
Source: https://habr.com/ru/post/1705372/More articles:MSI installation sequence - running database scripts before starting services - windows-installerGetDate() Ρ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΠ΅ΠΌ Entity Framework - ado.netserialized version files - c #How to protect data access in my new API? - designJQuery BlockUI - How to unlock user interface after file upload? - javascriptΠΠ°ΠΊ ΠΈΠ·ΠΌΠ΅Π½ΠΈΡΡ ΠΈΠ»ΠΈ ΡΠ΄Π°Π»ΠΈΡΡ ΠΈΡΡΠΎΡΠΈΡ ΡΠΎΠ΅Π΄ΠΈΠ½Π΅Π½ΠΈΠΉ Π² SQL Management Studio 2008? - sql-server-2008Thumbnail webpage creation on browser side - htmlΠΠΈΠ±Π»ΠΈΠΎΡΠ΅ΠΊΠ° Π°ΡΡΠ΅Π½ΡΠΈΡΠΈΠΊΠ°ΡΠΈΠΈ CodeIgniter 1.7 - authentication.Net Authentication Template - .netDisabling a window-shaped exit button? - c #All Articles