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
Write a program to show the process of spawning a child process
Explain the different types of data perl can handle.
Explain lists ?
How do find the length of an array?
How will you access an element of a perl array?
What is the difference between exec and system?
Distinguish my and local?
If EXPR is an arbitrary expression, what is the difference between $Foo::{EXPR} and *{"Foo::".EXPR}?
What package you use to create a windows services?
How to find the length of an array in perl?
Explain chop?
What are the advantages of c over Perl?
Explain the meaning of perl one-liner?
what is CPAN?
What is goto statement in perl?