http://www.perlmonks.org?node_id=979921


in reply to open many sockets in script

I would store the sockets in a data structure like an array instead of dynamically creating variable names. eg:
use strict; use Data::Dumper; my @sock_list; for (my $i=0;$i<10;$i++) { $sock_list[$i] = "..." . $i; } print Dumper(\@sock_list);
Update: ++ig