$chan2->exec('ls -lrt'); while (<$chan2>){ print }