Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

(tye)Re2: A Real Closure

by tye (Sage)
on Jul 13, 2001 at 00:46 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://96182]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-20 06:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found