in reply to Re: Next & Last - Perl's Expect
in thread Next & Last - Perl's Expect

This worked great! Thank you very much! So, the trouble was exactly what you mentioned being that the "next" command was not being reconginzed because it was in the Expect call.

Replies are listed 'Best First'.
Re^3: Next & Last - Perl's Expect
by ikegami (Patriarch) on Apr 28, 2005 at 22:11 UTC

    No, it has nothing to do with Expect. The problem was that the sub in which next was located did not have a loop. next doesn't work beyond a sub. That's because next is a keyword, not a function. Keywords have meaning at compile-time, but the caller of the sub is only known at run-time.

    Note that perl 6 will convert next into a special die, so it might work as you expected, depending on the guts of Expect.