in reply to What can we assume in a BEGIN block ?
The BEGIN block is executed first, so $foo is first set to 2, and then to 1. On the other hand,$foo = 1; BEGIN { $foo = 2 }
$foo is set to 1 and then 2.BEGIN { $foo = 1; $foo = 2 }
Dave.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: What can we assume in a BEGIN block ?
by leriksen (Curate) on Oct 04, 2004 at 11:31 UTC | |
by hv (Prior) on Oct 04, 2004 at 12:03 UTC | |
by leriksen (Curate) on Oct 04, 2004 at 12:36 UTC | |
by merlyn (Sage) on Oct 04, 2004 at 12:52 UTC | |
by leriksen (Curate) on Oct 05, 2004 at 00:05 UTC | |
by fergal (Chaplain) on Oct 04, 2004 at 12:56 UTC |