in reply to Re: Re: running a loop in background...
in thread running a loop in background...
Your problem boils down to the following: You have two loops, and you need to exit both of them from the innermost one. There are multiple ways of doing this (need I say that, with Perl?)
OUTER: for (;;) { while (<FH>) { # stuff last OUTER if substr($_,0,5) eq "\>info"; } # stuff }
for (my $done = 0; !$done;) { while (<FH>) { # stuff ++$done && last if substr($_,0,5) eq "\>info"; } # stuff }
By the way, watch the capitalization on the methods. I'm not certain if $mw->update will work; I'm more certain $mw->Update will.
perl -e 'print "I love $^X$\"$]!$/"#$&V"+@( NO CARRIER'
|
|---|