in reply to ulimit output?

It's because ulimit is a bash builtin. Try
$ perl -e '$foo = qx{echo `ulimit -n`}; print $foo;' 1024