Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Perl keywords for declaring variables: my, our and local???

by krusty (Hermit)
on Mar 22, 2003 at 19:24 UTC ( #245201=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
    print "$Our::a  <--shouldn't print anything here\n";
    print "$main::a <--should print 'a' from the main symbol table here\n"
    +;
    print "$a       <--should also print 'a' from the main symbol table he
    +re\n\t\tdue to lexically scoped alias\n";
    
  2. or download this
    foo
            <--shouldn't print anything here
    foo     <--should print 'a' from the main symbol table here
    foo     <--should also print 'a' from the main symbol table here
                    due to lexically scoped alias
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://245201]
help
Chatterbox?
[choroba]: fortunately, I haven't the need to verify this
[choroba]: haven't had
[choroba]: but most tourist here are form the US, France, and Russia
[Your Mother]: The best whiskey in Thailand is Vietnamese, is all I know.

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2017-02-26 05:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (371 votes). Check out past polls.