Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Autoresponder automator

by b10m (Vicar)
on Jul 27, 2005 at 12:22 UTC ( #478569=note: print w/replies, xml ) Need Help??


in reply to Re^2: Autoresponder automator
in thread Autoresponder automator

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://478569]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2023-01-27 01:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?