in reply to timed email reminder

I think some of the previous answers may have misunderstood the question. My interpretation is that you want to perform an action 6 days before the end of each month. (NOT every sixth day). My apologies if I'm wrong.

If I'm right, you could use localtime to check the date six days from now, and see if it will be the 1st of the month:

my $six_days_from_now = (localtime(time + 6*24*60*60))[3]; if ($six_days_from_now == 1) { Do_Action(); }

buckaduck