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