Scope: Extract a clean forecast from this url:
http://weather.noaa.gov/pub/data/forecasts/zone/pa/paz049.txt

I use HTTPGET on a WinXP Pro box to d/l the file. I was given this code (from Chatterbox users) to delete the first 16 lines:
perl -n -i.bak -e "print if $.>16" paz049.txt

Someone on the Chatterbox (bart and diotalevi) suggested a solution using:
print if s/^\.//

The "good" lines of the forecast all have a period at the beginning. I'm assuming this could be used to "extract" the good lines.

The .txt file is used for a weather crawler on in-store digital signage ( think WalMart TV). I'm using a batch file to execute the HTTPGET and the lines of perl.

Any help for this Perl NOOB is greatly appreciated.

Ben

In reply to Editing a text file by appletag

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.