package Example::Module; use strict; { # this variable is not accessible outside of the block # that it's in. thus, any access to it must go through # the subroutines defined in this block. my $variable; sub accumulate { $variable += $_ for @_ } sub printvalue { print $variable, $/ } } 1;