What happens if you add another network to the hashref with the address 10.19,72.0/25? That will sort lexically after the others even though in numerical network order it should come first!
You need to convert the address (excluding the netmask) into something that will produce the right result when sorting lexically. The Socket module provides inet_aton() to achieve this.
Cheers,
JohnGG
In reply to Re^2: Sorting Hash / Array
by johngg
in thread Sorting Hash / Array
by nickt9999
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |