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
Reference
Perl
palindromic dates
Aishwarya 101701
Perl - Sort hash of filenames by file extension
Challenge 41 Task 1
testing dereference of anonymous routines
Sea
Quotes
Lol