Argument "^CM-^V" isn't numeric in numeric comparison (<=>) at ...
warnings when you use <=>. That's because inet_aton() is actually returning a packed string. Consider the following:-
johngg@shiraz:~/perl/Monks > perl -MSocket -E '
> say ord for split m{}, inet_aton( q{192.168.45.92} );'
192
168
45
92
johngg@shiraz:~/perl/Monks > perl -E '
> say ord for split m{}, pack q{C4}, split m{\.}, q{192.168.45.92};'
192
168
45
92
johngg@shiraz:~/perl/Monks >
Therefore the cmp comparison is more appropriate.
|