You have two processes trying to attempt the print: both the parent and the child. But you are setting $output in only one of them. And in the other, since "lst" fails, $output is set to undef.
The parent will wait. The child, which doesn't have a child process $pid, will not.
It won't show you anything because printing undef prints the empty string. Even with two empty strings, there's still nothing to see.
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).