http://qs321.pair.com?node_id=427116

rockneybot has asked for the wisdom of the Perl Monks concerning the following question:

Hi. I have a script that relies heavily on system() calls to external programs. I'd like to be able to hide some or all of the ouput from STDOUT. What is the best way to do this? For instance if I have this:
system "/sbin/sfdisk -uM -q -L -O disksave --no-reread $device <<EOF\n +0,\nEOF"
How do I hide the output or perhaps selectively show the output?