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
What are the steps involved in configuring a server using cgi programming?
Which functions in perl allows you to include a module file. State their differences.
Show the use of sockets for the server and client side of a conversation?
How do you give functions private variables that retain their values between calls?
Give an example of the -i and 0s option usage.
What is automatic error handling in perl?
What is perl programming?
How to read file into hash array ?
How does polymorphism work in perl?
Explain string comparison operators in perl.
Is perl compiler or interpreter?
Explain lists in perl?
What is chomp() operator/function?
What is 'rollback' command in perl?
What is the function of virtual documents in cgi programs?