Skip to content

Instantly share code, notes, and snippets.

@pmichaud
Created September 3, 2009 05:14
Show Gist options
  • Save pmichaud/180140 to your computer and use it in GitHub Desktop.
Save pmichaud/180140 to your computer and use it in GitHub Desktop.
sub foo() {
my $*VAR ::= 'foo';
-> { say $*VAR; }
}
my $a = foo();
{
my $*VAR ::= 'caller';
$a(); # outputs 'caller'
}
$a(); # $*VAR not found ?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment