in reply to perl and shell

The usual way is to redirect STDERR to STDOUT, that is 2>&1.

This works as long as the programs write to STDERR and STDOUT, not to the terminal directly.

Note that when you launch a program in the shell in background, and then terminate the shell, the program in the background will receive a SIGHUP, so you might have to install a signal handler. <c>Or you might take a look at the great program screen.

Replies are listed 'Best First'.
Re^2: perl and shell
by Bloodnok (Vicar) on Oct 31, 2007 at 13:34 UTC
    Ahem ... jumps in with both feet expecting tirade of abuse...

    Both of the replies thus far hold true for sh, bash etc. etc. - however the redirection doesn't work in the C shell - which is one of the 10 reasons that Tom Christiansen recommends that the use of C shell, especially for scripting, be forgotten forever.

    At last, a user level that best describes my experience :-))