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 than /$entry/ > > > # But /$entry/ also splits remark

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

2008-06-12 Thread Jenda Krynicky
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 than /$entry/ > > # But /$entry/ also splits remarks_entries. > > # So I need the tr

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

2008-06-11 Thread Rob Dixon
oldgeezer wrote: > > Hi all, > > Sorry for the late response, I've been busy doing something else. That's cool. > As a newbie in this perl.beginners, I did not know that it is a good thing to > tell what purpose the script has. My script is purely hobby. All my scripts > are. As a general prin

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

2008-06-11 Thread Jenda Krynicky
From: oldgeezer <[EMAIL PROTECTED]> > But you also made me aware of a mistake > I always made until now. The three periods in > for (x...y) > I must have inherited that error from > another language. Probably from an > interpreter I wrote myself some 30 > years ago. It's not an error. Just so

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 like to understand is why looping > > 2 times thr

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

2008-06-08 Thread Rob Dixon
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 like to understand is why looping > 2 times through 5000 lines takes less time than > looping 5000 times through 2

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

2008-06-08 Thread Jenda Krynicky
From: oldgeezer <[EMAIL PROTECTED]> > 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 wrote a snippet that > does nothing with the data and yet the first > part is 5 times faster than

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

2008-06-08 Thread John W. Krahn
oldgeezer wrote: Hi all, Hello, Last week I discovered this perl.beginners group. Good stuff here, albeit many times hard to grasp the answers. But I'm learning. If you have any questions just ask (the list.) What I would like to understand is why looping 2 times through 5000 lines takes

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