This is fine:
if (open(my $fh, '<', $qfn)) { ...read from $fh... } # $fh is out of reach here
Perl doesn't care where the my is to the point that it allows the following (even though the behaviour is officially undefined):
my $fh if ...;
In reply to Re^3: if(my) scope
by ikegami
in thread if(my) scope
by oha
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |