Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Re: Re: random elements from array - new twist

by Anonymous Monk
on Nov 06, 2002 at 03:26 UTC ( #210639=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://210639]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2020-10-24 12:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (243 votes). Check out past polls.

    Notices?