title: How to properly use the try catch in perl that error.pm provides?
body: <p>I have found that there is the module <a href="http://search.cpan.org/perldoc/Error" rel="noreferrer">Error</a> that provides try and catch functionality like in java.  But I am confused at how you can print the exception that returns.</p>
  
  <p>I would like to understand how to do the following</p>
  
  <pre><code>try {
      // do something that will fail!
  
  } catch (Error e) {
      // Print out the exception that occurred
      System.out.println(e.getMessage());
  }
  </code></pre>
  
  <p>How do I get the print of the error with the stack trace?</p>