#!/usr/bin/perl -w use strict; sub Function_1 { my $up_bound1 = shift; my $total_f1; foreach my $in (0..$up_bound1) { $total_f1 += $in/3; } return $total_f1; } sub Function_2 { my $up_bound2 = shift; my $total_f2; foreach my $in (0 .. $up_bound2) { $total_f2 += $in; } return $total_f2; } ## Begin main process my $up_bound = 10; my $sum = Function_1($up_bound)+Function_2($up_bound); print "$sum\n";