Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

•Re: The Spudgun

by merlyn (Sage)
on Jul 16, 2002 at 18:26 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://182190]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-19 04:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found