{ my $bar; if ($foo) { $bar = "true"; } print $bar; } #### sub test { my $arg = shift; my $bar; if($arg) { $bar = "true"; } return $bar; } my $foo = 1; print test($foo); #### use strict; my $foo = 1; if ($foo) { package Strange; our $bar = "true"; } print $Strange::bar || "false";