> -----Original Message-----
> From: Tony Heal [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, March 06, 2007 10:43
> To: beginners@perl.org
> Subject: what does a lone percent sign mean?
> 
> I am trying to determine how this does what it does.
> 
>  
> 
> sub IsLeapYear
> 
> {
> 
>    my $year = shift;
> 
>    return 0 if $year % 4;
> 
>    return 1 if $year % 100;
> 
>    return 0 if $year % 400;
> 
>    return 1;
> 
> }
> 
>  
> 
> But I do not understand, and I can not find what a single, 
> lone % means.
> 
>  
> 
> Anyone know?
> 
>  
> 
> Tony
> 
> 
        modulo which is use the remainder after division by the number. 

        First is divide year by 4 so take 2007 / 4 which will give you a
remainder 3. So if 3 ( true ) then return 0. 

        You can take the next two.

          If you have any problems or questions, please let me know.

     Thanks.

  Wags ;)
David R Wagner
Senior Programmer Analyst
FedEx Freight
1.408.323.4225x2224 TEL
1.408.323.4449           FAX
http://fedex.com/us 
 


**********************************************************************
This message contains information that is confidential and proprietary to FedEx 
Freight or its affiliates.  It is intended only for the recipient named and for 
the express  purpose(s) described therein.  Any other use is prohibited.
**********************************************************************


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to