foreach $line(@newarray) {
        # Do stuff within the curly braces. $line holds the value of each
element of the array in turn.
        # 1st iteration of loop it contains $newarray[0], 2nd it contains
$newarray[1] etc, etc
}

Is this what you are after?

John

-----Original Message-----
From: Govinderjit Dhinsa [mailto:[EMAIL PROTECTED]]
Sent: 11 July 2001 11:03
To: '[EMAIL PROTECTED]'
Subject: RE: loop


        Is this possible, if not how can I go about doing this;

        while($line=<@newarray>){

        I want to go about runnig a loop on @newarray, but I also need the
varible to hold the @newarray!

        Thanks
        GD


--------------------------Confidentiality--------------------------.
This E-mail is confidential.  It should not be read, copied, disclosed or
used by any person other than the intended recipient.  Unauthorised use,
disclosure or copying by whatever medium is strictly prohibited and may be
unlawful.  If you have received this E-mail in error please contact the
sender immediately and delete the E-mail from your system.


  • RE: loop Govinderjit Dhinsa
    • John Edwards

Reply via email to