in reply to Re: sorting /etc/hosts (boo)
in thread sorting /etc/hosts
This sorts the "made-up" line to the end, whereas the original poster presumably would want it first.my @lines=<DATA>; print sort @lines; __DATA__ 10.194.196.9 made-up 10.194.196.55 heckyll 10.194.196.57 txwl013w 10.194.196.61 krios 10.194.196.62 stasis # dial up server
Like the other replies said, a numerical sort is more appropriate here. The number of "cycles" used either way is going to be pretty trivial.
|
|---|