http://qs321.pair.com?node_id=160409


in reply to Re: Re: Re: Re: Activeperl 5.6 fork() doesn't friggin work
in thread Activeperl 5.6 fork() doesn't friggin work

Or:

my (@cmds) = ("HELO", "dom:$domain", "ipaddr:$ipaddress", "addzone"); while (@cmds) { print $ns1 shift(@cmds), "\n"; $line = <$ns1>; # don't need the sleep; # the read should block until # a line is available. defined($line) or last; # quit if connection closed # (could die instead) print $line; # don't need \n now, $line # not chomped ($line =~ /^CAIO$/) and last; # $ can handle trailing # newline, with no # significant speed penalty # (should be optimized by # regex engine) }