Created
July 29, 2016 17:37
-
-
Save zoffixznet/efa0438a67893ce4293bc2bc969b2611 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my @nicks = <n1 n2 n3>; | |
my $current-nick = @nicks[0]; | |
loop { | |
say "Current nick is $current-nick"; | |
my $idx = 0; | |
for @nicks.kv -> $i, $n { | |
next unless $n eq $current-nick; | |
$idx = $i + 1; | |
$idx = 0 if $idx == @nicks; | |
}; | |
sleep 3 if $idx == 0; | |
$current-nick = @nicks[$idx]; | |
last if $++ > 7; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment