Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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?
[choroba]: Lanzarote is great!
choroba went there year ago
[Discipulus]: here spring has sprung, so the warm is available without holidays..
[Discipulus]: Oh I got a (small but better than nothing) salary increase!! beer for all!
[cavac]: Not sure if it's only my connection, but pause.cpan.org seems rather slow to respond today.

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2017-02-22 08:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (325 votes). Check out past polls.