Re: [aswin32] RE: Perl Bug (again)

2006-02-18 Thread Robert May
[snip ... why doesn't "my $i if 0;" generate a warning under "use warnings;"] Glenn Linderman wrote: Partly because the behaviour was probably implemented unintentionally (hence no original warning or error), and has been treated (once discovered by those nefarious end-user types) as a feature

Re: [aswin32] RE: Perl Bug (again)

2006-02-18 Thread John Deighan
At 04:50 PM 2/17/2006, Robert May wrote: my is a compile time directive that creates the lexically scoped $i, giving is scope from its definition until the end of the enclosing block. Assignment is a run time operation. In your example the modified assignment doesn't get executed, so the valu

Re: [aswin32] RE: Perl Bug (again)

2006-02-17 Thread Robert May
John Deighan wrote: At 01:06 PM 2/17/2006, Joe Discenza wrote: Fascinating! You have one misconception right off: The "my" line is never executed (not even to make the new variables) if $L is false. OK, then, consider this program. Notice that there's a global $i which has the value 5. Now,