Perl Monks please help!

I'm building integration tests. I have a bunch of machinery that processes an email and then spits out the modified email as a file in a new directory. I've also got a script that generates an email and passes it to the machinery. What I'm trying to do is capture the output from my machinery to figure out the name of the file it's just created.

I'm using Test::More to kick things off.
startup looks like:
sub startup : Test(startup) { system("perl $home/filterd.pl &"); sleep(3); #give the program some time to set up it's children etc. }
Then in a set of individual test I fire:
system("perl $home/filtermail.pl -test -to guy\@whatever.net -id 1234" +);

In order to generate results. The idea is that afterwards I check the output from the first program and then process the file it's generated.

Anyone have ideas as to how I capture the output from the first program? The first program uses syslog() to (if run from a terminal) output debug messages etc to the screen. (Presumably STDOUT?) But I can't capture those messages with STDOUT, the program just hangs waiting for input. My other attempt was capturing the results of the last command executed with $! (in the case of the second chunk of code, by running it with `cmd` instead). But this only gets me THAT programs output saying that it's sent information along. In any case I'm stumped.

update: Added a point of clarification and formatting.

In reply to Asynchronously capturing output from an external program by Furple

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.