On Mon, Apr 21, 2008 at 9:25 PM, J. Peng <[EMAIL PROTECTED]> wrote:
> On Tue, Apr 22, 2008 at 1:58 AM, Chas. Owens <[EMAIL PROTECTED]> wrote:
>
>  >  Because of a quirk in how the current and past versions of perl parsed
>  >  and handled the statement.  It is a mis-feature according to Larry.
>
>  Chas, do you mean this is a bad style to declare and assign a variable
>  like below?
>
>
>  my $y=0;
>  my @x =(1,2,3) if $y;
>  print Dumper [EMAIL PROTECTED];
snip

I mean it is an abuse of a bug.  The proper way to achieve that
behavior is to either use the state function in 5.10 or closures in
earlier versions.

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to