Re: Testing the first line of a file

2005-01-21 Thread Randy W. Sims
David Gilden wrote: Greetings, I was looking for a way to improve the following: # Check to make sure it is an inTune File open (FH, UPLOAD_DIR . "/$file") || error( $q, "Error reading $file for test : $!" ); while(){ if ($_ !~ /\*{5} InTune/){ unlink( UPLOAD_DIR . "/$file") or error( $q,

Testing the first line of a file

2005-01-21 Thread David Gilden
Greetings, I was looking for a way to improve the following: # Check to make sure it is an inTune File open (FH, UPLOAD_DIR . "/$file") || error( $q, "Error reading $file for test : $!" ); while(){ if ($_ !~ /\*{5} InTune/){ unlink( UPLOAD_DIR . "/$file") or error( $q, "Problem deleting