in reply to Re^3: Subroutine help
in thread Subroutine help
Heres the code, i want to be able to get input from user and get them added and output to be shown.use strict; use warnings; sub AddNumbers { my ($first_number, $second_number, $third_number, $fourth_number, +$fifth_number, $sixth_number) = @_; my $add = $first_number + $second_number + $third_number + $fourth +_number + $fifth_number + $sixth_number; return $add; } my $sum = AddNumbers( 1, 2, 3, 4, 5, 6 ); print "The sum of input numbers equals to: $sum \n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Subroutine help
by apl (Monsignor) on Aug 24, 2009 at 15:04 UTC |