note
quester
This is partly guesswork since I'm not at my Perl machine to test my theory at the moment, but...
<br />
<br />
in the source for Expect, [http://cpansearch.perl.org/src/RGIERSIG/Expect-1.21/Expect.pm], the definition of send_slow contains this...
<c>
sub send_slow{
...
while ($chunk = shift) {
@linechars = split ('', $chunk);
foreach $char (@linechars) {
...
</c>
The while condition really should have been (<b>defined</b> ($chunk = shift)) in order to avoid falling out of the loop when $chunk is false. (In your case it's "0" which is false, but "" would cause the same problem.)
<br />
<br />
You could patch your copy of Expect.pm (and optionally submit the patch to the module author for good karma.)
<br />
<br />
Oc you could just patch your own code to work around it, which is the path of least resistance.
According to the documentation, send_slow pauses after every individual character, not just after each string argument. So you could try changing these lines in your code
<c>
my @SlowChars = split(//,$_send);
print Dumper(@SlowChars);
my $return = $exp->send_slow(1,@SlowChars);
</c>
to just
<c>
print Dumper($_send);
my $return = $exp->send_slow(1,$_send);
</c>
<br />
<br />
<b>Update:</b> Remembered to add the inner parentheses to (defined <b>(</b>$chunk = shift<b>)</b>).
784722
784722