Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Multiple 'my's in one block of mod_perl code?

by ysth (Canon)
on Jul 13, 2009 at 00:29 UTC ( #779424=note: print w/ replies, xml ) Need Help??


in reply to Multiple 'my's in one block of mod_perl code?

No, though you will get a warning for it if they are in the same scope, to help keep you from doing it by accident. The new declaration will "hide" the old one until the end of its scope:

my $test = 1; my $test = 2; # warns { my $test = 3; print $test; # prints 3 } print $test; # prints 2


Comment on Re: Multiple 'my's in one block of mod_perl code?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://779424]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2014-12-22 03:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (110 votes), past polls