Re: foreach examples/usage

2001-07-17 Thread Rachel Coleman
On Tue, 17 Jul 2001, Evan Panagiotopoulos wrote: > I have an array of X elements and I want to go from the first element > (is it zero?) to the last. I have a variable containing the number of > elements in the array. If the array has 22 elements does it go from 0 > to 21 or 1 to 22? foreach doe

Re: foreach examples/usage

2001-07-09 Thread David Wood
Evan Panagiotopoulos wrote: > > I am trying to learn the foreach loop. Is there a place on the web where there are >examples for the foreach? Basically I have an array of X elements and I > want to go >from the first element (is it zero?) Yes! > to the last. I have a variable containing the

Re: foreach examples/usage

2001-07-08 Thread mcrawley
Sounds interesting. Please verify this link. -- Original Message -- From: "Jos I. Boumans" <[EMAIL PROTECTED]> Date: Sun, 8 Jul 2001 11:19:21 +0200 > >you might find the loops/block tutorial i wrote on >www.sharemation.com/~perl/tut helpfull > >regards, >

Re: foreach examples/usage

2001-07-08 Thread Jos I. Boumans
opoulos" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; "Jos I. Boumans" <[EMAIL PROTECTED]> Sent: Sunday, July 08, 2001 4:39 PM Subject: Re: foreach examples/usage > Sounds interesting. Please verify this link. > -- Original Message -

Re: foreach examples/usage

2001-07-08 Thread Jos I. Boumans
you might find the loops/block tutorial i wrote on www.sharemation.com/~perl/tut helpfull regards, Jos Boumans I am trying to learn the foreach loop. Is there a place on the web where there are examples for the foreach? Basically I have an array of X elements and I want to go from the first e

Re: foreach examples/usage

2001-07-07 Thread dave hoover
Evan wrote: > I am trying to learn the foreach loop. Is there a > place on the web where there are examples for the > foreach? There's good, quick example on Perl Monks: http://www.perlmonks.org/index.pl?node=foreach%20loops&lastnode_id=954 > Basically I have an array of X elements and > I want

RE: foreach examples/usage

2001-07-07 Thread Steve Howard
The first place in your array is 0, There are a couple of examples of foreach that I don't mind giving: my @array = qw{this is the example of the array we will use for this example}; foreach(@array) { print $_."\n"; # current element is $_ } or if you need the index of