Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Perl circular list
#perl 5.22.1 # perl weekly challenge 048 task 1 my @circleList=(1..10); while (scalar @circleList >1){ print join ",",@circleList; my $killer=shift @circleList; my $killed=shift @circleList; push @circleList,$killer; print "\n$killer killed $killed". ( (scalar @circleList > 1)? " and passed sword to $circleList[0]\n": " and is last man standing!!\n"); }
run
|
edit
|
history
|
help
0
Perl programs
Basics
Program List
taller in front
palindromic dates
Sort
Toy singleton class
reverse polish notation experiment
Array_with_shift_function
OSTL