Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!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