Skip to content

Instantly share code, notes, and snippets.

@miyagawa
Created May 19, 2011 16:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miyagawa/981223 to your computer and use it in GitHub Desktop.
Save miyagawa/981223 to your computer and use it in GitHub Desktop.
#!perl
use v5.10;
use AnyEvent;
my $cv = AE::cv;
my @timers;
for my $num (@ARGV) {
$cv->begin;
push @timers, AE::timer $_, 0, sub {
say $num;
$cv->end;
}
}
$cv->recv;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment