Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

(tye)Re2: A Real Closure

by tye (Cardinal)
on Jul 13, 2001 at 00:46 UTC ( #96182=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    BEGIN { my $x; sub foo { ... $x ... } }
  2. or download this
    #!/usr/bin/perl -w
    use strict;
    
    ...
    
    Dump $_
        for( \&begin, \&justmy, \&ifmy, \&static, \&inner, gen(), \&insert
    + );
    
  3. or download this
    Variable "$x" will not stay shared at closure.pl line 27.
    
    begin:
    ...
                1. 0x1a65170 ("$x" 66-68)
                2. 0x1a7b8e8 ("&" 1--1)
              OUTSIDE = 0x1a6f124 (MAIN)
    
  4. or download this
    begin:    1. 0x1a621b0 (FAKE "$x" 0-57)
    justmy:   1. 0x1a7b714 ("$x" 59-60)
    ifmy:     1. 0x1a7b780 ("$x" 61-62)
    ...
    inner:    1. 0x1a7b7ec (FAKE "$x" 0-64)
    gen():    1. 0x1a65080 (FAKE "$x" 0-67)
    insert:   1. 0x1a7b8c4 (FAKE "$x" 0-67)
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://96182]
help
Chatterbox?
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: (10)
As of 2015-07-06 08:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (70 votes), past polls