in reply to Re: A Random Fortune Cookie
in thread A Random Fortune Cookie

some more variations:

# no need to join perl -0x25 -e '$_{$.}=$_ while<>; print %_' # dumps one random cookie (not just shuffling): perl -0x25 -e '$_{$.}=$_ while<>; print ((%_)[$.==$.])' # and this but slicing it perl -0x25 -e '@_{<>}=1; print ((%_)[$.-$.]);' # not sure but this works too (re: looks like slice key is created aft +er slurping) perl -0x25 -e '@_{1..$.}=<>; print %_;'

p.s. I did not know about -0x25, thanks