On Sat, 2008-10-04 at 16:09 +0200, Clemens Bieg wrote: > Hello, > > Could someone tell me what I am doing wrong? I want it to iterate over the > lines of "extract", at each line going through all the lines of > "allnumbered", checking if the line number is the same, and, if so, print > out the line from "allnumbered". But with this I am getting only the first > line, then it stops. > > Many thanks in advance. > Clemens > > > while (<$fh_in_extract>) { > > if( /^(\d+)/ ) { > my $n = $1; > > while (<$fh_in_allnumbered>) { > if( /^$n / ) { > > > print $fh_out_final $_; > } > }
seek $fh_in_allnumbered, 0, 0; # See `perldoc -f seek` for details > } > } -- Just my 0.00000002 million dollars worth, Shawn Linux is obsolete. -- Andrew Tanenbaum -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/