Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 lurking in the Monastery: (11)
As of 2014-09-16 09:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (158 votes), past polls