Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Perl Beginners > Re: a declaring
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 8 Topic 10970 of 11509
Post > Topic >>

Re: a declaring

by chas.owens@[EMAIL PROTECTED] (Chas. Owens) Apr 21, 2008 at 09:27 PM

On Mon, Apr 21, 2008 at 9:25 PM, J. Peng <peng.kyo@[EMAIL PROTECTED]
> wrote:
> On Tue, Apr 22, 2008 at 1:58 AM, Chas. Owens <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 @[EMAIL PROTECTED]
 =(1,2,3) if $y;
>  print Dumper \@[EMAIL PROTECTED]
 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 im****tant skill a programmer can have is the ability to read.
 




 8 Posts in Topic:
a declaring
peng.kyo@[EMAIL PROTECTED  2008-04-21 22:40:19 
Re: a declaring
noreply@[EMAIL PROTECTED]  2008-04-21 17:37:20 
Re: a declaring
noreply@[EMAIL PROTECTED]  2008-04-21 17:54:23 
Re: a declaring
chas.owens@[EMAIL PROTECT  2008-04-21 13:21:46 
Re: a declaring
noreply@[EMAIL PROTECTED]  2008-04-21 22:12:37 
Re: a declaring
chas.owens@[EMAIL PROTECT  2008-04-21 13:58:28 
Re: a declaring
peng.kyo@[EMAIL PROTECTED  2008-04-22 09:25:38 
Re: a declaring
chas.owens@[EMAIL PROTECT  2008-04-21 21:27:17 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 23 21:10:02 CDT 2008.