Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

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

by Anonymous Monk
on Nov 06, 2002 at 03:26 UTC ( [id://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.

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: random elements from array - new twist
by BrowserUk (Patriarch) 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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://210639]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2024-03-28 19:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found