Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

write a script to check whether user enter a value is a
leap year or not?

Answer Posted / sourisengupta

#call this function by passing the year....


sub isLeapyear
{
$year=shift;
if($year%4==0){
if($year%100==0){
if($year%400==0)
return 1;
return 0;
}
return 1;
}
}

Is This Answer Correct ?    7 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does the qx{ } operator do?

969


How interpreter is used in perl?

988


What are the two ways to get private values inside a subroutine?

965


Give an example of the -i and 0s option usage.

940


What is the difference between use and require in perl?

913


what is the function of Return Value?

1119


Why aren't Perl's patterns regular expressions?

1244


What are the reasons that cookie server can’t handle multiple connections?

989


How do I read command-line arguments with Perl?

1061


What are the arguments and what do they mean in perl programming?

1047


How do you give functions private variables that retain their values between calls?

999


How to read multi lines from a file in perl?

971


How we can navigate the xml documents?

1060


Explain what is lvalue?

1069


Is there any way to add two arrays together?

1026