Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Re: For loop problem

by japhy (Canon)
on Jun 03, 2001 at 23:19 UTC ( #85357=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $start = $a;
    $end = ++$a;
    for ($_ = $start; $_ <= $end; $_++) { ... }
    
  2. or download this
    for (++$x .. $x++ . $x) { ... }
    # starting at ++$x
    # ending at $x++ . $x
    # THE END HAS MODIFIED THE START
    
  3. or download this
    print ++$x, ++$x, ++$x;  # 333
    
  4. or download this
    $x = 3;
    print ++$x/$x--;  # 3/4 => 0.75
    
  5. or download this
    for (++$x .. $x++ . $x--) { ... }
    # or
    for (++$....$.++.$.--) { ... }
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (9)
As of 2014-10-01 08:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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











    Results (390 votes), past polls