title: Execute Perl in Emacs, most basic
body: <p>I'm learning how to use Perl in Emacs. I used to run R with R-Studio.</p>
  
  <p>How do I execute a command without leaving Emacs?</p>
  
  <p><strong>Example:</strong> In R-studio I type</p>
  
  <pre><code>    print("hello world") 
  </code></pre>
  
  <p>and press <kbd>Ctrl</kbd>+<kbd>Enter</kbd> and R-studio executes the command and prints <code>"hello world"</code>.
  How do I do the same in Emacs for a Perl command?</p>
  
  <p>I usually type <kbd>Ctrl</kbd>+<kbd>X</kbd> <kbd>Ctrl</kbd>+<kbd>F</kbd> test.pl </p>
  
  <pre><code>    print "hello world";
  </code></pre>
  
  <p>and then I don't know what to do for Emacs to execute the command.</p>