in reply to [Resolved] Call to ulimit in perl's system() causes unexplainable behavior
Have a look at BSD::Resource, esp the getrlimit and setrlimit functions with the RLIMIT_FSIZE parameter.