in reply to Foreach & scalar ref: break of way that it is suposed to work!
is more or less equivalent tofor $foo (...) { ... }
or{ local $foo; for $foo (...) { ... } }
depending on what $foo is (global or lexical).{ my $foo; for $foo (...) { ... } }
This also means that
is likefor my $foo (...) { ... }
{ my $foo; for $foo (...) { ... } }
You can't local or my $foo{bar}.
Juerd
- http://juerd.nl/
- spamcollector_perlmonks@juerd.nl (do not use).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re2: Foreach & scalar ref: break of way that it is suposed to work!
by dragonchild (Archbishop) on Apr 08, 2003 at 22:53 UTC | |
by Juerd (Abbot) on Apr 08, 2003 at 23:10 UTC |