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

Re^2: "eval" and "my" variable weirdness

by ikegami (Patriarch)
on Jun 29, 2006 at 16:54 UTC ( [id://558378]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # Module.pm
    use warnings;
    ...
    my $thingy = 'thangy';
    sub doit { eval 'print "thingy is $thingy\n"'; }
    1;
    
  2. or download this
    use Module;
    Module::doit();  # "thingy is "
    
  3. or download this
    {
       use warnings;
    ...
    }
    
    Module::doit();  # "thingy is "
    
  4. or download this
    {
       use warnings;
    ...
    }
    
    doit();  # "thingy is "
    
  5. or download this
    {
       use warnings;
    ...
    }
    
    doit();  # "thingy is thangy"
    
  6. or download this
    {
       use warnings;
    ...
    }
    
    doit();  # "thingy is thangy"
    
  7. or download this
    {
       use warnings;
    ...
    }
    
    doit();  # "thingy is thangy"
    
  8. or download this
    {
       use warnings;
    ...
    }
    
    doit();  # "thingy is thangy"
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-03-29 07:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found