- or download this
@sortedip = map {
"$$_[0].$$_[1].$$_[2]$$_[3]"
...
/(\d+)[.](\d+)[.](\d+)[.](\d+)/;
[$1, $2, $3, $4]
} @ip;
- or download this
@sorted = sort {
($$a[0] <=> $$b[0]) or
...
push @range, $previous;
$previous = $current;
}
- or download this
$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}}
split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/