note
Fletch
<p>
On some OSen the <tt>ulimit</tt> command is solely a shell builtin, not an external program. When you try and run it via backticks Perl is looking at your command and thinking it can cheat and run the command itself rather than invoking a shell (since it's a simple command with spaces as the only shell metacharacter). If your OS is one of those without a separate <tt>ulimit</tt>, what's really happening is that Perl tries to <tt>exec</tt> the non-existent program and fails (giving you back an undef, but you don't check for that).
</p>
<p>
The work around is to explicitly get the shell involved, either by putting some shell metacharacters in your command (<c>qx/ulimit -n 3>&-/</c>) or by invoking a shell explicitly (<c>qx/bash -c "ulimit -n"/</c>).
</p>
<p>
<b>Update:</b> Tweaked sample metacharacters in first example.
</p>
<div class="pmsig"><div class="pmsig-58196">
<p>
The cake is a lie.<br />
The cake is a lie.<br />
The cake is a lie.<br />
</p>
</div></div>
677831
677831