Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: Caffeine and its delivery to monks in need

by Juerd (Abbot)
on May 16, 2002 at 06:57 UTC ( #166939=note: print w/ replies, xml ) Need Help??


in reply to (wil) Re: Caffeine and its delivery to monks in need
in thread Caffeine and its delivery to monks in need

my $i = $caffeine_level; for ($i = 0; $i < 100; ++$i) {

The first assignment is useless, as $i's value is immediately overwritten. The loop is inefficient, as for simple loops like this, a Perlish loop is faster and easier to write: for (1..100). Yes, I changed it from 0..99 to 1..100, because 1..100 looks better and you're not using the iterator variable anyway.

- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.


Comment on Re: Re: Caffeine and its delivery to monks in need
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2014-09-17 04:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (57 votes), past polls