foreach() and while()

2002-09-27 Thread eric-perl
Hello, All: When using foreach or while() on an array, how can I access the index of the list that foreach()/while() is working upon? Is there an internal variable that stores this info like PHP's current()? -- Eric P. Sunnyvale, CA -- To unsubscribe, e-mail: [EMAIL PROTECTED

Re: foreach() and while()

2002-09-27 Thread James Edward Gray II
If you need this, I suggest using the good old fashioned for ($i = 0; $i END; $i++) { }. Nothing broken there, I don't think. James On Thursday, September 26, 2002, at 11:12 PM, [EMAIL PROTECTED] wrote: Hello, All: When using foreach or while() on an array, how can I access the index

Re: foreach() and while()

2002-09-27 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Hello, All: Hello, When using foreach or while() on an array, how can I access the index of the list that foreach()/while() is working upon? Is there an internal variable that stores this info like PHP's current()? No, Perl doesn't have a variable like that, you

Re: foreach() and while()

2002-09-27 Thread Paul Johnson
On Fri, Sep 27, 2002 at 01:40:09PM -0700, John W. Krahn wrote: [EMAIL PROTECTED] wrote: When using foreach or while() on an array, how can I access the index of the list that foreach()/while() is working upon? Is there an internal variable that stores this info like PHP's current

Re: problem with foreach and while with array

2002-08-29 Thread Priss
Thank you Connie for helping me on this, it was fixed by below comment you made :))) SOA: while (SOA) { chomp; You don't need to chomp it, or you don't need $/ at last of the next line. Priss __ Do You Yahoo!? Everything you'll ever

problem with foreach and while with array

2002-08-28 Thread Priss
Hiya, Wonder if someone could help me, I am trying to write a script to pulls out all the machine names from a revese DNS file, some how, my script will only print out the machine names with 1.x.x.in-addr.arpa $nslookup = '/usr/local/bin/nslookup'; $dig = '/usr/local/bin/dig'; @ZONES =

Re: problem with foreach and while with array

2002-08-28 Thread Connie Chan
Wonder if someone could help me, I am trying to write a script to pulls out all the machine names from a revese DNS file, some how, my script will only print out the machine names with 1.x.x.in-addr.arpa $nslookup = '/usr/local/bin/nslookup'; $dig = '/usr/local/bin/dig'; @ZONES