Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: Re: For loop problem

by japhy (Canon)
on Jun 03, 2001 at 23:19 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://85357]
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found