Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

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?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2015-11-29 13:38 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (751 votes), past polls