#!perl $s='(\d+\.\d+\.\d+\.\d+)'; while(<>) { $d[$i++]=$_;} print sort {my($c,$d); $a=~/$s/; $c=$1; $b=~/$s/; $d=$1; $c cmp $d;} @ +d; [download]
In reply to Sort in IP in 2 lines. by strredwolf