Say I have sent a command to a process using the fwrite command something like
...
while (true) {
switch (expect_expectl($stream, $cases)) {
case "ls":
fwrite($stream, "ls -aln");
break;
..
Is there a way I can save the output from that process to a variable ?