#!/usr/bin/perl

# Prompt the user to enter a year
print "Enter a year: ";
my $year = <STDIN>;
chomp($year);

# Check if it's a leap year
if ((($year % 4 == 0) && ($year % 100 != 0)) || ($year % 400 == 0)) {
    print "$year is a leap year.\n";
} else {
    print "$year is not a leap year.\n";
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: