Lexical Variables
- Declare "private," "scoped," or "lexical" variables with the my keyword.
- Name your parameters.
sub sum_of_three_numbers {
my ( $a, $b, $c );
( $a, $b, $c ) = @_;
$a + $b + $c;
}
# outside the sub, we can't get to @_, $a, $b, or $c