in reply to How to capture data from STDOUT?

Use backticks (qx//), or open() a pipe to the program.
If it's a one-time-thing, you can also let your shell do the job: someprogram | perl yourscript.pl

2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$