Help for this page

Select Code to Download


  1. or download this
    sub total {
     my $number;
    ...
    print "Enter some numbers on separate lines: \n";
    my $user_total = &total(<STDIN>);
    print "The total of those numbers is $user_total.\n\n";