( our $path = $0 ) =~ s/\\[^\\]*$//; #### my $foo; BEGIN { $foo = 'bar'; }