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
In reply to Re^2: A Random Fortune Cookie
by bliako
in thread A Random Fortune Cookie
by choroba
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |