http://qs321.pair.com?node_id=210639


in reply to Re: Re: Re: random elements from array - new twist
in thread random elements from array - new twist

You are right...and accidentally demonstrated why you should break things out a little more and put in parens. I am a decent Perl programmer, and that code is unmaintainable.

Just because Perl lets you do something doesn't mean that you should.

  • Comment on Re: Re: Re: Re: random elements from array - new twist

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: random elements from array - new twist
by BrowserUk (Pope) on Nov 06, 2002 at 03:34 UTC

    You have a good point. In truth, I wrote that function several months back when I first started exploring perl's syntax. When the question came up, I just grepped for the line and c&p'd it into the answer as a means of demonstrating the concept. I wasn't trying to sell or promote that particular implementation of shuffle.

    I am kind of embarrassed to have had to defend it.


    Nah! You're thinking of Simon Templar, originally played (on UKTV) by Roger Moore and later by Ian Ogilvy