Need some help with getting time in PERL.
I want a day count that will consistently go up till the end of time. I know there is a count that shows the number of days that have passed in the year, but it resets when the year ends. I need a counter that doesn't. Can anyone help?
Justin S posted this at 15:03 — 25th October 2000.
They have: 2,076 posts
Joined: Jun 1999
Here's an idea. Why not just create a simple count script that add 1 to the value of a text file every time its executed. Then start a cron job so the server will execute the script once every 24 hours. It's an idea...
Justin Stayton - [email] [icq]
anti posted this at 17:11 — 7th November 2000.
They have: 453 posts
Joined: Jan 1999
or just use the Date::Calc module:
#!/usr/bin/perl
use Date::Calc qw( Delta_Days Today );
print Delta_Days( 1, 1, 1, Today( ) );
This should do the trick.
anti
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.