Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

MOPT-03 - identification, part 1

by mstone (Deacon)
on Dec 27, 2002 at 02:08 UTC ( #222451=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        If we apply operation X to a variable of type Y, 
        we get a variable of type Z.
    
  2. or download this
        X(Y) : Z
    
  3. or download this
        $GLOBAL  = "static";
        $LOCAL   = "dynamic";
    ...
        }
        
        global_scope();
    
  4. or download this
        global scope:        static,dynamic,lexical 
        evaluation context:  static,dynamic,lexical
    
  5. or download this
        sub local_scope {
            local ($LOCAL) = "-------";
    ...
        print "\n";
        print "but outside local_scope(), we still have:\n";
        show_evaluation_context();
    
  6. or download this
        local scope:         static,-------,lexical 
        evaluation context:  static,-------,lexical 
        
        but outside local_scope(), we still have:
        evaluation context:  static,dynamic,lexical 
    
  7. or download this
        sub lexical_scope {
            my ($LEXICAL) = "-------";
    ...
        local_override();
        print "\n";
        lexical_scope();
    
  8. or download this
        lexical scope:       static,dynamic,------- 
        evaluation context:  static,dynamic,DYNAMICALLY RE-BOUND VALUE 
        
        lexical scope:       static,dynamic,------- 
        evaluation context:  static,dynamic,lexical 
    
  9. or download this
        package Foo;
        
    ...
        print $Foo::VAR1, "\n";
        print $VAR1, "\n";
        print $VAR2, "\n";
    
  10. or download this
        VAR1 in package 'Foo'.
        VAR1 in package 'main'.
        VAR2 in package 'main'.
    
  11. or download this
        my $total = 0;
        for $i (1..10) {
            $total += $i;
        }
        print $total, "\n";
    
  12. or download this
        sub sum_of {
            my ($item, @list) = @_;
            return ((defined $item) ? $item + sum_of (@list) : 0);
        }
        print sum_of (1..10), "\n";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://222451]
Front-paged by TStanley
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (13)
As of 2014-07-23 13:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (144 votes), past polls