Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: loopy trouble

by jeffa (Bishop)
on Jan 07, 2016 at 21:31 UTC ( #1152252=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # find sum of first 100 digits
    my $sum = 0;
    for my $i (0 .. 99) {
        $sum += $i;
    }
    
  2. or download this
    # print lines from a file handle and stop when done
    while (my $line = <FILE>) {
        print $line;
    }
    
  3. or download this
    for (0 .. 99) {
        print "$_\n";
        last if $_ == 42;
    }
    
  4. or download this

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2022-05-24 16:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (84 votes). Check out past polls.

    Notices?