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.
>
>
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 belo
Chas. Owens wrote:
On Mon, Apr 21, 2008 at 11:37 AM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote:
snip
Please read the last para in the "Statement Modifiers" section in "perldoc
perlrun".
snip
I think you mean perlsyn, not perlrun:
http://perldoc.perl.org/perlsyn.html#Statement-Modifiers
Y
On Mon, Apr 21, 2008 at 10:40 AM, J. Peng <[EMAIL PROTECTED]> wrote:
> I'm not sure, but why this can work?
>
> use strict;
> use warnings;
> use Data::Dumper;
>
> my $y=0;
> my @x =(1,2,3) if $y;
> print Dumper [EMAIL PROTECTED];
>
>
> Since $y is false, it seems @x shouldn't be declared.
>
On Mon, Apr 21, 2008 at 11:37 AM, Gunnar Hjalmarsson <[EMAIL PROTECTED]> wrote:
snip
> Please read the last para in the "Statement Modifiers" section in "perldoc
> perlrun".
snip
I think you mean perlsyn, not perlrun:
http://perldoc.perl.org/perlsyn.html#Statement-Modifiers
--
Chas. Owens
wonkd
Gunnar Hjalmarsson wrote:
J. Peng wrote:
I'm not sure, but why this can work?
use strict;
use warnings;
use Data::Dumper;
my $y=0;
my @x =(1,2,3) if $y;
print Dumper [EMAIL PROTECTED];
Since $y is false, it seems @x shouldn't be declared.
Please read the last para in the "Statement Modifier
J. Peng wrote:
I'm not sure, but why this can work?
use strict;
use warnings;
use Data::Dumper;
my $y=0;
my @x =(1,2,3) if $y;
print Dumper [EMAIL PROTECTED];
Since $y is false, it seems @x shouldn't be declared.
Please read the last para in the "Statement Modifiers" section in
"perldoc pe
I'm not sure, but why this can work?
use strict;
use warnings;
use Data::Dumper;
my $y=0;
my @x =(1,2,3) if $y;
print Dumper [EMAIL PROTECTED];
Since $y is false, it seems @x shouldn't be declared.
But why the last print can work?
--
J. Peng - QQMail Operation Team
eMail: [EMAIL PROTECTED] A