On Jan 13, 2008 1:20 PM, John W. Krahn <[EMAIL PROTECTED]> wrote: snip > Statements don't define scope, braces and files define scope. snip > > so why should you be able to use it because it has been changed to this > > > > my $t = $x if $x; > > print "$t\n"; > > You can use it because it is in the same scope. snip
And that is why I consider it to be a bug. There is no reason for conditional modifiers to not have their own scope. For instance, the conditional form of for still localizes $_, even though there is no scope for it to be localized in: #!/usr/bin/perl use strict; use warnings; $_ = "foo"; print "$_\n" for "bar"; print "$_\n"; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/