RE: Strange foreach need..........

2001-08-24 Thread Crowder, Rod
Gary Do you need to read the file into the array, why not process the file directly eg while (<>) { $first = $_; $second = <>; chomp $first; chomp $second; # Do your stuff here printf ("First Line = %s, Second line = %s\n",$first, $second);

Re: Strange foreach need..........

2001-08-23 Thread Michael Fowler
On Thu, Aug 23, 2001 at 05:28:42PM -0600, Gary Luther wrote: > I have a file that has paired lines, in other words I need to process them kinda >like one line. > > Let me 'splain. > > I read a file into the array @rename > > foreach $lines (@rename) { > do a bunch of stuff here > now I nee

Re: Strange foreach need..........

2001-08-23 Thread Jeff 'japhy/Marillion' Pinyan
On Aug 23, Gary Luther said: >foreach $lines (@rename) { > do a bunch of stuff here > now I need to read the next line to get some info > that needs to be processed with the first line info > I want to be able to do something like??? > $line2=<@rename>; > do some stuff on $line2 > write ou