Re: Date::Manip question

2012-11-08 Thread Gerhard
On Thu, Nov 08, 2012 at 10:56:00AM +, Marco van Kammen wrote: > my $current_month =(should be Nov) > my $current_mont_num = (should be 11) > my $previous_month = (should be Oct) > my $previous_month_num = (should be 10) There is Time::Piece and

Re: Date::Manip question

2012-11-08 Thread Ken Slater
On Thu, Nov 8, 2012 at 7:42 AM, Marco van Kammen wrote: > Yeah, so something like this: > > #!/usr/bin/perl > > use strict; > use warnings; > > my $previous_month; > my $previous_month_num; > > my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); > > my @months = ( 'JAN', 'F

RE: Date::Manip question

2012-11-08 Thread Marco van Kammen
evious_month_num\n"; seems to work... :-) Thanks all! Marco van Kammen Applicatiebeheerder Mirabeau | Managed ServicesDr. C.J.K. van Aalstweg 8F 301, 1625 NV Hoorn +31(0)20-5950550 - www.mirabeau.nl Please consider the environment before printing this email

Re: Date::Manip question

2012-11-08 Thread David Precious
On Thu, 8 Nov 2012 12:53:31 +0100 Rob Coops wrote: > Something like the below would do perfectly fine... > > my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = > localtime(time); > > my @months = ( 'JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', > 'SEP', 'OCT', 'NOV', 'DEC' ); >

Re: Date::Manip question

2012-11-08 Thread Rob Coops
On Thu, Nov 8, 2012 at 12:53 PM, Rob Coops wrote: > > On Thu, Nov 8, 2012 at 11:56 AM, Marco van Kammen > wrote: > >> Hi List, >> >> ** ** >> >> For a logrotation and cleanup script I want to fill the following >> variables. >> >> ** ** >> >> my $current_month =(shou

Re: Date::Manip question

2012-11-08 Thread Rob Coops
On Thu, Nov 8, 2012 at 11:56 AM, Marco van Kammen wrote: > Hi List, > > ** ** > > For a logrotation and cleanup script I want to fill the following > variables. > > ** ** > > my $current_month =(should be Nov) > > my $current_mont_num = (should be 11)