It makes sense to me because the "my" is up outside of the curlies. This wouldn't work, for example:
Parenthencies don't influence lexical scope.if ( scalar( @_ ) ) { my $t = shift; $t =~ s/change_something/to_something_else/; } print "$t\n";
In reply to Re: Duh. 'my' scope in if else blocks.
by doom
in thread Duh. 'my' scope in if else blocks.
by gam3
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |