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


in reply to Generate Random IP Addresses

#!/usr/bin/perl use strict; srand(time() ^ ($$ + ($$ << 15))); for (1..100){ print join ('.', (int(rand(255)) ,int(rand(255)) ,int(rand(255)) ,int(rand(255)))) , "\n"; } __OUTPUT__ 210.232.115.79 18.239.245.96 15.138.29.10 182.166.124.240 118.118.155.180 80.200.1.109 139.170.113.124 85.13.30.193 80.198.199.175 111.162.166.83 ... a.s.o.

pelagic