nmerriweather has asked for the wisdom of the Perl Monks concerning the following question:
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();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: 'block' idiom needed
by shigetsu (Hermit) on Jan 06, 2007 at 23:29 UTC | |
by nmerriweather (Friar) on Jan 07, 2007 at 00:28 UTC | |
|
Re: 'block' idiom needed
by diotalevi (Canon) on Jan 07, 2007 at 00:05 UTC | |
by nmerriweather (Friar) on Jan 07, 2007 at 00:29 UTC | |
by diotalevi (Canon) on Jan 07, 2007 at 06:44 UTC | |
by nmerriweather (Friar) on Jan 07, 2007 at 20:32 UTC | |
|
Re: 'block' idiom needed
by Lod (Initiate) on Jan 07, 2007 at 18:39 UTC |