b10m:
You use system() to copy a file. Not very Perl'ish ;)
Detonite:
I don't know how else to do it (yet). (File::Copy?)

That would work.

b10m:
$sdate (and others) will be in this format: 27-7-5, while "2005-07-27" probably makes more sense to international users.
Detonite:
I've been doubting that, yeah. I didn't think anyone else will use this, so I just left it this way.

First of all, you post it here, so someone might be using it already. Secondly, you seem to use that information also in your reply emails (s/_DATE_FROM_/$sdate/g;) - and those might reach other mailboxes besides yours ;)

b10m:
Script dies when target start date has not been reached yet.
Detonite:
It does? That's a bug. Thanks!

Before you updated the node, it said "die("...") if($sdate ne $cdate)", so yes, it will die ;) Instead of die'ing, you might want to print just errors, so when something fails, cron will notify you. (See the --silent option I suggested before).

Detonite
As I said, it's for the exercise. If I don't code, I won't improve. Plus I wanted to make a shell script first, asked in the CB, and got asked why I didn't make a Perl script ;)

True, it's good excercise, yet Perl isn't always the right tool ;)

--
b10m

All code is usually tested, but rarely trusted.

In reply to Re: Autoresponder automator by b10m
in thread Autoresponder automator by jkva

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.