#!/usr/bin/perl #sum of number between 1 and 1,000,000 $n = 1_000_000; my $t = 0; $t = addup( $t, $n-- ) while $n; print "$t\n"; sub addup { $_[0] + $_[1]; }