Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
shuffle array
sub shuffle { my @deck = @{shift @_}; my @newdeck; while (@deck){ push @newdeck, splice @deck,int (rand ($#deck+1)),1 } return @newdeck } my @a = (1,2,3,4,5,6,7,); print shuffle (\@a);
run
|
edit
|
history
|
help
0
Perl - Sort hash of filenames by file extension
Perl logo
grid
101744
Cheat attractive
Sanjana 101742
XPPErrorLog
Perl Lang
array flipper
Quote code