in reply to Capturing output of commands to a file

$FILEOUT contains the file handle, not the name, so redirecting to it in your command line will not work. File handles are only usable by perl commands. Perhaps:

while ( my @row = $sth->fetchrow_array() ) { system("ss GET $row[2]\/$row[1] -V$row[4] -GL$mydir > $mydir/summ +ary_log.txt 2>&1"); }
Dum Spiro Spero

Replies are listed 'Best First'.
Re^2: Capturing output of commands to a file
by parthodas (Acolyte) on Nov 12, 2015 at 22:02 UTC
    The solution worked. Thanks a lot. Looking for an option to display the message on screen too. If there is any option available.
      This is no longer a Perl question, but take a look at the tee Unix/Linux command.

      Update: oops, looking again at your OP, it seems that you are under Windows, not Unix. There are some Windows tee implementations (e.g. wintee or Powershell Tee) but I just don't know if they fit your requirement.