title: Perl's equivalent to python exec?
body: <p>Python legal code: </p>
  
  <pre><code>  exec("def f():print 123"); f();
  </code></pre>
  
  <p>What is a Perl equivalent construction or how to bind symbols from eval to current scope from Perl's eval?</p>
  
  <pre><code>  eval("sub f(){ print 123;}"); f();
    "Undefined subroutine &amp;main::f"
  </code></pre>
  
  <p><strong>Question is not actual, because it has misprint in it first definition.</strong></p>