P is for Practical | |
PerlMonks |
Re: removing a columnby johngg (Canon) |
on Jun 17, 2009 at 22:47 UTC ( [id://772567]=note: print w/replies, xml ) | Need Help?? |
It is a good idea to check for the success of your opens and closes and to use the three argument form for open with lexical filehandles. You should also use single quotes if you don't need interpolation. You need to take care when sorting IPs as a simple lexical sort will give odd results.
I use sprintf here to form each quad into a fixed width string with leading zeros, making a 12-digit string that can be sorted lexically.
The output.
I hope this is helpful. Cheers, JohnGG
In Section
Seekers of Perl Wisdom
|
|