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 2 of 8 Topic 10970 of 11531
Post > Topic >>

Re: a declaring

by noreply@[EMAIL PROTECTED] (Gunnar Hjalmarsson) Apr 21, 2008 at 05:37 PM

J. Peng wrote:
> I'm not sure, but why this can work?
> 
> use strict;
> use warnings;
> use Data::Dumper;
> 
> my $y=0;
> my @[EMAIL PROTECTED]
 =(1,2,3) if $y;
> print Dumper \@[EMAIL PROTECTED]
> 
> 
> Since $y is false, it seems @[EMAIL PROTECTED]
 shouldn't be declared.

Please read the last para in the "Statement Modifiers" section in 
"perldoc perlrun".

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
 




 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 Fri Jul 25 18:57:43 CDT 2008.