in reply to Comma seperated output
while(my $line = <$log>) { $n++; $line =~ tr/\r\n//d; if ($line =~ /^(.*)INFO:.*recvd AA_BIN_MSG_GET_WLT/) { $Time_Stamp = $1; while ( $line = <$log> ) { ... while ( $line = <$log> ) {
This structure makes little sense to me. You read in a loop from $log, but then, you read in an inner loop, again from $log, and then you enter another nested loop to read until you are at the end of the file. Is this an error or do you have specific criteria why you want to read until the end of the file?
I think this is a good time to step back and make a list of what the program should actually do, and then to rewrite that code completely, as the structure and intention of this code is quite unclear to me.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Comma seperated output
by namishtiwari (Acolyte) on Jun 15, 2009 at 09:52 UTC | |
by Corion (Patriarch) on Jun 15, 2009 at 10:01 UTC |