Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://779424]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2016-12-02 21:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (50 votes). Check out past polls.