develooper Front page | perl.perl5.porters | Postings from July 2008

Re: my $foo = "bar" if $baz;

Thread Previous | Thread Next
Andy Armstrong
July 10, 2008 18:38
Re: my $foo = "bar" if $baz;
Message ID:
On 11 Jul 2008, at 02:30, David Golden wrote:
>> From perldelta on 5.10.0:
>  Deprecated use of my() in false conditional
>      A new deprecation warning, *Deprecated use of my() in false
>      conditional*, has been added, to warn against the use of the  
> dubious
>      and deprecated construct
>          my $x if 0;
> I'd always heard not to initialize my variables in a conditional  
> statement.

Yeah, it's obviously a bad idea - but it shouldn't trample on memory  
(assuming that's what's happening).

Andy Armstrong, Hexten

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About