1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
#!/usr/bin/perl use strict; use warnings; sub my_func { my ($num1, $num2) = @_; print $num1+$num2, "\n"; my_other_func ($num1*3, $num2*24); return $num1*$num2; } sub my_other_func { my ($num1, $num2) = @_; print "my_other_func: n1=<$num1> n2=<$num2>\n"; return $num1 * $num2; } my_func(1, 50);