in reply to Re: How do you move within an array using foreach?
in thread How do you move within an array using foreach?
That's how I read it also. If that's what the questioner is after, I have to do it often enough that I usually write it as a one-liner: perl -ne "print if /\[foo\]/../\[foo2\]/" foofile(Nothing wrong with your code, just wanted to point out a short-circuit version.)
BTW, I used double-quotes in that example because I presume the questioner is doing this on a windows system; i.e. typing at cmd.exe or something.
|
|---|