I need to generate a list of IP-addresses (IPv4) in Perl. I have start and end addresses, for example 1.1.1.1 and 1.10.20.30. How can I print all the addresses inbetween?
Use Net::IP's looping feature:
The
+
operator is overloaded in order to allow looping though a whole range of IP addresses: