Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: eval not behaving like I expected... why?

by blokhead (Monsignor)
on Mar 13, 2006 at 21:23 UTC ( [id://536387]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $foo = "blah";
    print $main::foo; ## whoops, not the same variable
    
  2. or download this
    eval 'my $foo = 1';
    print $foo; ## whoops, outside of $foo's scope
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-04-24 22:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found