Skip to content

Instantly share code, notes, and snippets.

@Maki-Daisuke
Created December 16, 2010 03:19
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
use AnyEvent::Handle;
my $c = AE::cv;
my $out = AnyEvent::Handle->new(fh => \*STDOUT);
my $in; $in = AnyEvent::Handle->new(
fh => \*STDIN,
on_read => sub{
my $hdl = shift;
$out->push_write($hdl->rbuf . "\n");
$hdl->rbuf = "";
}
);
$out->push_write("Start\n");
$c->recv;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment