Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Closures as Itterators

by bikeNomad (Priest)
on Jun 30, 2001 at 20:19 UTC ( [id://92925]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while (1) { ... next if () ... last }
    
  2. or download this
     LINE: {
            chomp($row = <$fh>) or last LINE;
            redo LINE if $key < $min;
            $done = 1 && return if ($key > $max);
          }
    
  3. or download this
    sub itter_maker {  # return a function that passes back data allowed b
    +y the given predicate subroutine
      my $predicate = shift; #CODE ref
    ...
          return;
        });
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2024-04-18 11:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found