Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: execute a string

by beech (Parson)
on May 04, 2016 at 07:39 UTC ( #1162154=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ cat ideone-6TneLv.pl
    #!/usr/bin/perl
    our @v;   # external values stack
    ...
    -2**4 = -16
    1+2+3+4+5+6+7+8+9+10 = 55
    
  2. or download this
    sub Calc {
        local($_) = @_;
        local @v = ();
    ...
        s/[\r\n]*//g; ## "chomp"
        print $_," = ", Calc($_), "\n"; 
    }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2020-10-26 10:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (251 votes). Check out past polls.

    Notices?