See if this recent thread offers any help.
The two take-away items from that thread are:
use Data::Dumper; my @exp_stat; @exp_stat = expect('-re', 'session:\n$'); print Dumper(\@exp_stat);
Of course, for item 2 to be useful, you'll have to break up your giant expect() call into individual ones. And the meaning of each array element is documented both in the Expect.pm docs and that recent thread.
In reply to Re: Issue with Expect
by jffry
in thread Issue with Expect
by azstyx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |