Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

•Re: The Spudgun

by merlyn (Sage)
on Jul 16, 2002 at 18:26 UTC ( #182190=note: print w/replies, xml ) Need Help??


in reply to The Spudgun

$how[rand($rand_max) % (scalar @how)], $where[rand($rand_max) % (scalar @where)], $what[rand($rand_max) % (scalar @what)]);

Much simpler, and more traditional, to write these as:

$how[rand @how], $where[rand @where], $what[rand @what];

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re: •Re: The Spudgun
by MrCromeDome (Deacon) on Jul 16, 2002 at 18:31 UTC
    Thank you =) I was blinded by my C way of doing things.

    MrCromeDome

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2020-10-28 06:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (260 votes). Check out past polls.

    Notices?