in reply to Re^2: oneliner for selecting multiple values from array (shuffle)
in thread oneliner for selecting multiple values from array

Your solution, toolic, is nice but not equivalent to the original script; the original could choose two elements that are equal; yours can't... ;-)
[]s, HTH, Massa (κς,πμ,πλ)
  • Comment on Re^3: oneliner for selecting multiple values from array (shuffle)

Replies are listed 'Best First'.
Re^4: oneliner for selecting multiple values from array (shuffle)
by toolic (Bishop) on Nov 18, 2008 at 15:38 UTC
    Fair enough -- I guess I focussed more on the description rather than the code of the OP:
    Is there a way to select multiple values from the array without repetition?
    I interpreted the description as meaning "unique" elements of the array, which my solution will provide. So, there seems to be a discrepancy between the OP description and code.

      Indeed, the OP continues with:

      For instance how to properly do the following:

      which rather implied to me that the code may not have been "proper". i.e. it can select multiple elements with repetition.


      Perl reduces RSI - it saves typing