fork download
  1. #!/usr/bin/perl
  2. print "Enter the Year: \n";
  3. $yr=<STDIN>;
  4. if($yr%4==0)
  5. {
  6. print "Leap Year \n";
  7. }
  8. else
  9. {
  10. print "Not a leap Year \n";
  11. }
Success #stdin #stdout 0.01s 5316KB
stdin
Standard input is empty
stdout
Enter the Year: 
Leap Year