in reply to Re^2: if(my) scope
in thread if(my) scope
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 ...;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: if(my) scope
by oha (Friar) on Oct 12, 2009 at 14:50 UTC | |
by ikegami (Patriarch) on Oct 12, 2009 at 17:01 UTC |