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