pearcalorieconverter.pl


#Perl
#Perl section of function comparison 1
#Calculates calories of pear
#Lines of code(without comments)=8
#Lines of code(including all comments)=15

sub calorie
{
    my $cal_pound=27;
    print "Enter weight of your pear(in pounds): ";
    my $weight=<>;
    my $calories_pear=cal_pound * weight;
    print "Your pear contains about $calories_pear calories.";
}

I already wrote those in Python and Ruby, so I thought, why not write one in Perl.