in the above example, $result should equal 1. everything that i thought would work either does nothing, is invalid, or exits the block() functionsub block { my $setting= 0; { $setting= 1; COMMAND; $setting= 2; } return $setting; } $result= block();
In reply to 'block' idiom needed by nmerriweather
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |