in reply to Re: How to sort IP addresses
in thread How to sort IP addresses
use strict; use warnings; my @ips = qw(123.156.89.12 12.245.67.1 12.45.67.180 12.145.66.20); @ips = sort {$a cmp $b} @ips; print join "\n", @ips;
Prints:
12.145.66.20 12.245.67.1 12.45.67.180 123.156.89.12
is probably not what OP was after.
|
|---|