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.
In reply to Re: What can we assume in a BEGIN block ?
by dave_the_m
in thread What can we assume in a BEGIN block ?
by leriksen
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |