More idiomatic shuffle.pl. corrected a small bug in tk version (side => -side)