Re: some questions about for, foreach

2002-03-04 Thread Jon Molin
"John W. Krahn" wrote: > > Jon Molin wrote: > > > > Jan Gruber wrote: > > > > > > Hi, Jon && list ! > > > On Friday 01 March 2002 11:29 am, you wrote: > > > > Hi list! > > > > > > > > I've always thought there's a difference between for and foreach, that > > > > for uses copies and foreach not. B

Re: some questions about for, foreach

2002-03-01 Thread John W. Krahn
Jon Molin wrote: > > Jan Gruber wrote: > > > > Hi, Jon && list ! > > On Friday 01 March 2002 11:29 am, you wrote: > > > Hi list! > > > > > > I've always thought there's a difference between for and foreach, that > > > for uses copies and foreach not. But there's no diff is there? > > > > AFAIK th

RE: TIMTOWDI Was: RE: some questions about for, foreach

2002-03-01 Thread John Edwards
Yeah, yeah. So I made a typo. :p -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 01 March 2002 18:00 To: [EMAIL PROTECTED] Subject: TIMTOWDI Was: RE: some questions about for, foreach It is really sad when people can't get their MLA (Multi-Letter Ac

Re: some questions about for, foreach

2002-03-01 Thread George Gunderson
On Friday, March 1, 2002, at 10:22 , John Edwards wrote: > I think it lies in the history of programming. Traditionally for loops > look > like this (when written in perl) > > for($i=1; $i<=100; $i++){ >print "$i\n"; > } One could write, as an alternative to for: $i=1; while ($i<=100) {

Re: TIMTOWDI Was: RE: some questions about for, foreach

2002-03-01 Thread Brett W. McCoy
On Fri, 1 Mar 2002, Brett W. McCoy wrote: > On Fri, 1 Mar 2002, Dennis G. Wicks wrote: > > > It is really sad when people can't get their MLA > > (Multi-Letter Acronym) correct! > > > > It should be TIMTOWTDI > > > > "There Is More Than One Way To Do It" > > I prefer Err, ignore that... I h

Re: TIMTOWDI Was: RE: some questions about for, foreach

2002-03-01 Thread Brett W. McCoy
On Fri, 1 Mar 2002, Dennis G. Wicks wrote: > It is really sad when people can't get their MLA > (Multi-Letter Acronym) correct! > > It should be TIMTOWTDI > > "There Is More Than One Way To Do It" I prefer http://www.chapelperilous.net/ -

RE: some questions about for, foreach

2002-03-01 Thread Brett W. McCoy
On Fri, 1 Mar 2002, Nikola Janceski wrote: > what the heck is TIMTOWDI? It's TMTOWTDI There's More Than One Way To Do It 00 pronounced like tim-toady. -- Brett http://www.chapelperilous.net/ -

TIMTOWDI Was: RE: some questions about for, foreach

2002-03-01 Thread Dennis G. Wicks
It is really sad when people can't get their MLA (Multi-Letter Acronym) correct! It should be TIMTOWTDI "There Is More Than One Way To Do It" which is the Perl Hackers motto. Good Luck! Dennis -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROT

RE: some questions about for, foreach

2002-03-01 Thread Nikola Janceski
olin'; [EMAIL PROTECTED] Subject: RE: some questions about for, foreach I think it lies in the history of programming. Traditionally for loops look like this (when written in perl) for($i=1; $i<=100; $i++){ print "$i\n"; } while foreach loops look like this. @array = qw(o

Re: some questions about for, foreach

2002-03-01 Thread Jeff 'japhy' Pinyan
On Mar 1, Jon Molin said: >I've always thought there's a difference between for and foreach, that >for uses copies and foreach not. But there's no diff is there? >From perlsyn, "Foreach Loops": The foreach keyword is actually a synonym for the for keyword, so you can use for

Re: some questions about for, foreach

2002-03-01 Thread Brett W. McCoy
On Fri, 1 Mar 2002, Jon Molin wrote: > > It merely depends on your preferences, readable/maintanable code vs > > quick && dirty. > > if there's no difference, what's the point of having both? I can't see > how readable/maintanable would increase by adding functions with the > same name, it'd rath

RE: some questions about for, foreach

2002-03-01 Thread John Edwards
or foreach command supported. And, as the saying goes, TIMTOWDI, and it wouldn't be perl without that ;) OTOH I could be completely wrong :) HTH John -Original Message- From: Jon Molin [mailto:[EMAIL PROTECTED]] Sent: 01 March 2002 15:09 To: [EMAIL PROTECTED] Subject: Re: some q

Re: some questions about for, foreach

2002-03-01 Thread Jeff 'japhy' Pinyan
On Mar 1, Jon Molin said: >Jan Gruber wrote: >> >> On Friday 01 March 2002 11:29 am, you wrote: >> > >> > I've always thought there's a difference between for and foreach, that >> > for uses copies and foreach not. But there's no diff is there? >> >> AFAIK there's not really a difference betwee

Re: some questions about for, foreach

2002-03-01 Thread Jon Molin
Jan Gruber wrote: > > Hi, Jon && list ! > On Friday 01 March 2002 11:29 am, you wrote: > > Hi list! > > > > I've always thought there's a difference between for and foreach, that > > for uses copies and foreach not. But there's no diff is there? > > AFAIK there's not really a difference between

Re: some questions about for, foreach

2002-03-01 Thread Jan Gruber
Hi, Jon && list ! On Friday 01 March 2002 11:29 am, you wrote: > Hi list! > > I've always thought there's a difference between for and foreach, that > for uses copies and foreach not. But there's no diff is there? AFAIK there's not really a difference between these two. It merely depends on you

some questions about for, foreach

2002-03-01 Thread Jon Molin
Hi list! I've always thought there's a difference between for and foreach, that for uses copies and foreach not. But there's no diff is there? my @a = (1, 2, 3 , 4 , 5); $_ += 2 for (@a); print "@a\n"; 3 4 5 6 7 my @a = (1, 2, 3 , 4 , 5); $_ += 2 foreach (@a); print "@a\n"; 3 4 5 6 7 why isn