I strongly suspect that, if you re-insert the sleep before shelling out, your results will be modified since the perl process won't otherwise have enough time to complete the print.
Have you tried the fork/exec approach ?
Have you tried an even lower limit and running the program using truss (or is it strace on linux) ?
As an afterthought, I do wonder if you've uncovered a bug in perl...
In reply to Re^3: Ulimit makes program hang
by Bloodnok
in thread Ulimit makes program hang
by memo2005
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |