Last active
August 29, 2015 13:56
-
-
Save exodist/8870805 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
my $foo = "hello\n"; | |
$a = undef; | |
$b = undef; | |
EVIL: | |
$foo = $a if $a; | |
eval "goto $b" if $b; | |
sub speak { print $foo }; | |
my $foo = "bye\n"; | |
speak(); | |
print $foo; | |
$a = "Blah!\n"; | |
$b = "GOAWAY"; | |
goto EVIL; | |
GOAWAY: | |
speak(); | |
exit; | |
__END__ | |
"my" variable $foo masks earlier declaration in same scope at temp.pl line 15. | |
hello | |
bye | |
Blah! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment