Any
eval statement does its execution in the current context and scope. Any variables that are available to code in the current scope are also available to code you eval, and any changes to those variables done in your eval block persist after it's over.
my $code = '$a = 2;'; # $a is meaningless here; it's just a string
sub hi {
my $a = 1;
eval $code;
print "$a\n"; # 2
}