Normally, we recommend reading files and dealing with them line-by-line. That doesn't really work for sorting. So just read your text file into @ips, chomping as appropriate, and then sort as above. All I was helping you with was the sorting of ip octets, not the reading of a file or writing to a file. Those are left as an excersise for the reader. (I never knew how much fun it was to say that until I left university... :-})
In reply to Re^3: sorting ip octets
by Tanktalus
in thread sorting ip octets
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |