[Jerusalem.pm] Yesterday's meeting

Eitan Schuler Eitan.schuler at exlibris.co.il
Wed Jun 23 01:35:46 PDT 2004


Motke has suggested a solution like this:

$delta = 1000;
$from = 0;
$to = $delta;
while (@big_matches < $n) {
  push @big_matches, @matches = grep { $_ =~ /$pattern/ }
@ReallyBigArray[$from..$to];
  $from = $to+1;
  $to += $delta;
}

I don't know a simple way to do that.
Eitan


> -----Original Message-----
> From: Yehuda Berlinger [mailto:jon at actcom.co.il]
> Sent: Wednesday, June 23, 2004 9:22 AM
> To: Jerusalem Perl Mongers
> Subject: Re: [Jerusalem.pm] Yesterday's meeting
> 
> 
> I'm really sorry that I can't seem to make any of these meetings. 
> Yesterday evening was the final party in my kids school.
> 
> I really wanted to know about functional programming, too, since I 
> had just such a problem come up regarding lazy lists.
> 
> I wanted to know if there was a way to break a grep after a certain 
> number of matches:
> 
> 	@matches = grep { $_ =~ /$pattern/ } @ReallyBigArray;
> 
> Of course I can use a loop, a counter and the last command. I 
> understand that lazy lists might be coming in Perl 6. There are also 
> some cpan modules for this, but I don't think they do what I need.
> 
> Yehuda
> 
> 23 Jun 2004
> 
> > Dear Perl Mongers,
> > We had a very good meeting yesterday, I gave a short talk on two
> > topics: "Splitting filename into its components" and "Flushing
> > output". Then we have heard an interesting session from Zach about
> > "Lisp and Perl - functional programming". We were 8 in this 
> meeting. I
> > will send out announcement on the next meeting as soon as 
> we will know
> > the exact date.
> > 
> > We have introduced our web-site: http://jerusalem.perl.org.il
> > In this site almost all presentations / examples are/will be
> > available. It includes information on meetings as well. 
> Please send me
> > comments and new ideas if you have. I think of a "link 
> page" where we
> > can list all perl links. Please send me perl-site links if you know
> > some. I would like to emphasize that the website is in it's 
> very first
> > stages.
> > 
> > Regards
> > Eitan Schuler
> > 
> > _______________________________________________
> > Jerusalem mailing list
> > Jerusalem at perl.org.il
> > http://perl.org.il/mailman/listinfo/jerusalem
> 
> 
> _______________________________________________
> Jerusalem mailing list
> Jerusalem at perl.org.il
> http://perl.org.il/mailman/listinfo/jerusalem
> 



More information about the Jerusalem mailing list