
alantyss
Deleted
Jul 28, 2000, 9:21 AM
Post #1 of 3
(300 views)
|
|
How can I loop through each line till end of file?
|
Can't Post
|
|
I need to loop through a log file called rawdata.wrk where I take the first line then parse it into the variables below and then process it and then loop through to the next line and apply the same thing and leave the loop once all lines in the file has been processed. Here is what I have so far and for some reason it is given me an infinite loop. Can someone please help me? Thanks open RAW, "<rawdata.wrk") or die "Cannot open rawdata.wrk; $!\n"; ($vdate, $id, $vtime, $job_string, $clock_IP, $host_IP, $type)= split(/,/); while() ($vdate, $id, $vtime, $job_string, $clock_IP, $host_IP, $type)= split(/,/); if (($vdate < $ndate) && ($vtime < $ntime)) { print OUTFILE "good"; } else { print OUTFILE "hello\n"; system(1,"time $ntime"); system(1, "date $ndate"); } }
|