in reply to testing files for valid content

I would like to modify this file so that it checks for a full record or not

What denotes a full record? I'm assuming a record with nine columns. So all you have to do (unless you use a CSV module) is split the line and make sure it has nine values.

while (<FILE>) { chomp; my @values = split /,/; next if @values != 9; my($timeoftest, $login, $searchload, $searchresults, $searchdetails, $addlisting, $editlisting, $logout, $sitecode) = @values; # print the stuff like before }

Replies are listed 'Best First'.
Re^2: testing files for valid content
by chromatic (Archbishop) on Apr 23, 2009 at 18:44 UTC
    So all you have to do (unless you use a CSV module) is split the line and make sure it has nine values.

    Be careful. That works until a column has embedded (presumably quoted or otherwise escaped) commas. If splitting on commas always worked, there'd be little need for a module.