IP addresses are just 32-bit numbers. If you just need any random address, then:
my $addr = int rand 2**32; # Perhaps some code for formatting the address into # dotted-quad form
If you need to make sure the address has certain properties (like "class-B, private address space"), then your task is harder. I'm not sure if there is a module available. It's not that common of a task.
"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.
In reply to Re: Generate Random IP Addresses
by hardburn
in thread Generate Random IP Addresses
by matt.schnarr
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |