# $foo and $bar are not accessable outside of this scope { my ($foo, $bar) = qw(Hello world); DoSomething(); } # this is outside of the above scope so it can not access $foo and $bar sub DoSomething { print "$foo $bar\n"; }