Hi, thanks, it working very well.
Damien ---------- Initial Header ----------- From : news <[EMAIL PROTECTED]> To : [EMAIL PROTECTED] Cc : Date : Fri, 10 Oct 2003 19:17:39 +0200 Subject : Re: working on time On Fri, 10 Oct 2003 12:13:45 -0400, Bill Akins wrote: > Try this: > #!/usr/bin/perl -w > > my @now = localtime; > my $sec = ( $now[0] ); > my $min = ( $now[1] ); > my $hr = ( $now[2] ); > my $day = ( $now[3] ); > my $mth = ( $now[4] + 1 ); > my $yr = ( $now[5] + 1900 ); > > $day = ($day -1); No! Do _not_ try this! What happens when you're using this code on the 1st of a month? I recently fallen in love (...) with Time::Piece (and Time::Seconds), which let me do this in a nifty way; #!/usr/bin/perl # use strict; use warnings; use Time::Seconds; use Time::Piece; my $today = localtime; my $yesterday = $today - ONE_DAY; my $tomorrow = $today + ONE_DAY; Install Time::Piece and do a 'perldoc Time::Piece' for more information. -- Tore Aursand <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ********** L'ADSL A 20 EUR/MOIS********** Avec Tiscali, l'ADSL est à 20 EUR/mois. Vous pourrez chercher longtemps avant de trouver moins cher ! Pour profiter de cette offre exceptionnelle, cliquez ici : http://register.tiscali.fr/adsl/ Offre soumise à conditions. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]