If "ugly is as ugly does," your code ain't ugly.
That's not to say you're wrong is assuming there are more perl-ish ways, especially including those that don't require recourse to a system utility, line 5, "$header=`cut -f1,2,$_ ...." But whether those are more effective, more elegant or less "ugly" is pretty much in the eye of the beholder... and what amounts to self-deprecation is far from obligatory. Remember,
Maybe you'll consider labeling your issues with code that works, as a search for other ways to do it.
If you didn't program your executable by toggling in binary, it wasn't really programming!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||