Re: looping 2 times through 5000 differs from 5000 times through 2

2008-06-12 Thread oldgeezer
Jenda Krynicky wrote: > From: Rob Dixon <[EMAIL PROTECTED]> > > oldgeezer wrote: > > > foreach my $entry (uniq @IK){ > > > foreach my $line(@DATA) { > > > # Note /;$entry;/ takes longer than > > > # /$entry;/ and that takes longer

Re: looping 2 times through 5000 differs from 5000 times through 2

2008-06-11 Thread oldgeezer
On Jun 8, 5:03 pm, [EMAIL PROTECTED] (Rob Dixon) wrote: > oldgeezer wrote: > > Hi all, > > > Last week I discovered this perl.beginners group. > > Good stuff here, albeit many times hard to grasp > > the answers. But I'm learning. > > > What I would l

looping 2 times through 5000 differs from 5000 times through 2

2008-06-08 Thread oldgeezer
Hi all, Last week I discovered this perl.beginners group. Good stuff here, albeit many times hard to grasp the answers. But I'm learning. What I would like to understand is why looping 2 times through 5000 lines takes less time than looping 5000 times through 2 lines. To show what I mean, I wrot