title: How do I get a directory listing in Perl?
body: <p>I would like to execute <code>ls</code> in a Perl program as part of a CGI script. For this I used <code>exec(ls)</code>, but this does not return from the <code>exec</code> call.</p>
  
  <p>Is there a better way to get a listing of a directory in Perl?</p>