You'll get better responses if you give your posts a descriptive title. If you have two seperate questions, post them seperately so both can have a good title.
See %SIG in perlvar
You can redirect their STDOUT and STDERR when you shell out to them in the same way as you would in the shell, or you can capture them using backticks or open
Snippets of code should be wrapped in
<code> tags not<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).