develooper Front page | perl.beginners | Postings from February 2009

RE: Query in Perl Programming

Thread Previous | Thread Next
From:
rajini.s
Date:
February 22, 2009 20:24
Subject:
RE: Query in Perl Programming
Message ID:
96AEBFA15D710543A6A0F226BDC8AEE22614EA5D51@GVW1125EXB.americas.hpqcorp.net

Hi Rob, 

 When I included the below code in my script, I 
 am getting below errors. 

Use of uninitialized value in integer ge (>=) at /usr/local/lib/perl5/5.8.0/Time/Local.pm line 73.
Use of uninitialized value in integer lt (<) at /usr/local/lib/perl5/5.8.0/Time/Local.pm line 73.
Use of uninitialized value in integer ge (>=) at /usr/local/lib/perl5/5.8.0/Time/Local.pm line 73.
Use of uninitialized value in integer gt (>) at /usr/local/lib/perl5/5.8.0/Time/Local.pm line 77.

Any idea, why I am getting above errors ?

Rajini 



 

>-----Original Message-----
>From: Rob Dixon [mailto:rob.dixon@gmx.com] 
>Sent: Friday, January 30, 2009 5:32 PM
>To: Perl Beginners
>Cc: S, Rajini (STSD)
>Subject: Re: Query in Perl Programming
>
>S, Rajini (STSD) wrote:
>>  
>> Hi Rob,
>> 
>> When I set the date to 30-Jan-2009 and run the code given below,
>> 
>> Eg : 
>> 
>> When dates are set as : 
>> 
>> my $days1 = epoch_days('30-Jan-09');
>> my $days2 = epoch_days('29-Feb-2009');
>> 
>> I get the below error. 
>> 
>> hpcll402:/home/ssssraji/perl>./date2.pl
>> Day '30' out of range 1..28 at ./date2.pl line 35
>
>My apologies - there is a problem with my code. The 
>initialisation should be
>
>  my %month_num = do {
>    my $n = 0;
>    map(($_, $n++), qw/jan feb mar apr may jun jul aug sep oct 
>nov dec/);
>  };
>
>(The only change being that $n starts at zero instead of one.)
>
>HTH,
>
>Rob
>
Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About