#!/usr/bin/perl5

print "Hello!  What is your name?  ";

$name = <STDIN>;
chop($name);

print "\n$name, how old are you?\n";
$age = <STDIN>;

if ($age >= 30)
{
    print "You can't be trusted!\n";
}
else
{
    print "I wish I were young again!\n";
}

$birthdate = 1997 - $age -1;

print "\nWere you born in $birthdate? (y or n)  ";
$response = <STDIN>;
chop($response);

if ($response eq "y")
{
    print "Aren't I smart?\n\n";
}
else
{
    print "You were born too early in the year!\n\n";
}

for ($i = 1; $i <= $age; $i = $i + 1)
{
    print "$i\n";
}

print "\nWell, goodbye $name!\n";

exit;
