Applying a regex across multiple files

This is the anonymous monk who posted the question. Thanks to Nuance, juahonen, and lhoward for their help.

Sorry for the prior (partially unformatted) reply. I expected <CODE></CODE> to provide implied breaks.

Here's what I came up with. I don't fully grok the OO stuff, but the Owl, Ram, Llama and Camel books help enough to get simple stuff done. This is the first time I've looked for outside help - y'alls responsiveness is great.

Suggestions for improvements are welcome.

#!/usr/bin/perl -wT # Specify Perl modules use Time::localtime; use Net::Ping; use LWP::UserAgent; # Define base scalars my $time = localtime; my $targurl = 'http://wwwsomesite/somefile.html'; my $targhost = 'www.somesite'; my $agent = 'Mozilla/4.5 [en] (X11; I; Linux 2.0.36 i486; Nav)'; my $raw = '/tmp/tempfile'; my $out = '/var/www/outfile.txt'; my $pl = 'thisfilename.pl'; my $desturl = 'http://thiswebserver.org'; # Gen log header printf " thisfile.pl : %02d-%02d-%04d %02d:%02d:%02d\n", $time->mon ++1, $time->mday, $time->year+1900, $time->hour, $time->min, $time->se +c; prin

janitored by ybiC: Closed unbalanced <code> tag and removed html formatting markup from code.   Did *not* modify apparantly-incomplete code listing


In reply to RE: Applying a regex across multiple files by Anonymous Monk
in thread Applying a regex across multiple files by nuance

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.