Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Accessing lexically scoped variables from a subref

by /dev/urandom (Beadle)
on Dec 27, 2007 at 23:39 UTC ( [id://659268]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    ...
    my $bar = 'foo';
    my $foo = Foo->new;
    print "|", $foo->convert(sub {$i; return $bar}), "|\n";
    
  2. or download this
    #!/bin/false
    package Foo;
    ...
    }
    
    1;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://659268]
Approved by almut
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-26 09:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found