Oct 302010
Return the last evaluated statement from function in Perl
Answer:
By default, Perl does not require you to explicit return the the last evaluated statement from function.
E.g.
print function1();
sub function1 {
my $i = 99;
}
The above program will output 99, and you can see the return statement is not needed and it is a valid Perl program.