use Date::Calc qw(:all);
($new_year, $new_month, $new_day) = Add_Delta_Days($year, $month, $day, $Dd);
... where $new_year,... etc are the results, $year, $month, $day is your arbitrary starting date, and $Dd is the "delta" (the number of days difference). $Dd can be either positive...
Apologies if I'm missing something obvious; I've been up a long, long time. :)
Is there a reason you can't use mod_perl's internal_redirect_handler?
Basically, you'd set up a module as a PerlTransHandler in your httpd.conf, and that module would have some way of knowing what "real"...
You don't need to change the code above, just change the contents of $message to include your HTML. If the mail reader supports HTML email, it'll work... if not, it will still work (from your end), but will display the raw HTML to the user.
For example:
$message = "<HTML><BODY><P...
Date::Calc will do the job, honest! Just use the Today() function:
($year,$month,$day) = Today([$gmt]);
... and then parse the results.
Alternately, you can use the "Swiss Army Knife" of date manipulation, Date::Manip. Here's a little snippet that gets the current date and prints...
Anything is possible. :) The real question would be: where is the perl script living, what is the nature of the database on the big iron, and how do the two talk?
There are many database interfaces available in perl, for a variety of databases. Check...
I'm not entirely clear on what you're trying to accomplish... it sounds like you have a list of deltas (differences between two dates) and you're trying to find the average of those.
Take a look at the Date::Manip package on CPAN (http://search.cpan.org). There are all kinds of date comparing...
fagga --
system() forks off a new process, runs the specified program, then returns to the calling program, which has been patiently waiting for the return. Your calling program can check return codes, look for errors, etc.
exec(), on the other hand, replaces your current process with the new...
Anyone know why sha1sum and the following script which uses Digest::SHA1 would generate different output? Am I misusing Digest::SHA1 in some weird way?
#!/usr/bin/perl -w
use Digest;
sub hash_msg {
my $hashed = Digest->new("SHA-1");
$hashed->add($_[0]);
return...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.