in reply to how to supress stdout

<code> tags are your friend.

You can get rid of output by overriding the default STDOUT.

open(STDOUT, ">redirect.txt") or die "Problem redirecting STDOUT.";

or make it go away entirely on UNIX-like systems as

open(STDOUT, ">/dev/null") or die "Problem redirecting STDOUT.";

Update:

I should also point out you should make a backup of STDOUT before you redirect, so you can print to it later if you want...

open(STDOUTBACKUP, ">&STDOUT");

Replies are listed 'Best First'.
Re^2: how to supress stdout
by zwon (Abbot) on Dec 12, 2008 at 18:39 UTC
    Also you can redirect only output of sqlldr:
    open ($sqlldr3, "|sqlldr usr/pass\@db >/dev/null 2>&1")
      hi
      what does this mean?
      >/dev/null 2>&1 in the open call? I see two redirects. Can you explain this?

        First, standard output is redirected to /dev/null. Assuming 1 is standard output file descriptor & 2 is standard error, standard error is also redirected to the same place as standard output (which is to /dev/null).

        Above will work only when a bourne-like shell (FreeBSD /bin/sh, bash, zsh, etc.) handles the redirection.