title: Run perl subroutine in the background
body: <p>Is there a way to run a perl subroutine in the background?  I've looked around and seen some mentions in regards to threads but it would help to see an example, or point me in the right direction. Thanks.</p>
  
  <p>Would like to run <code>run_sleep</code> in the background.</p>
  
  <pre><code>#!/usr/bin/perl
  
  print "Start of script";
  run_sleep();
  print "End of script";
  
  sub run_sleep {
      select(undef, undef, undef, 5);  #Sleep for 5 seconds then do whatever
  }
  </code></pre>