Your index values of @values, don't seem to match up with the standards for Common Log Format. You may be splitting on space instead of using a better regex. This parsing problem has already been solved. Ch 8, Parsing Web Access Logs of Perl for Web Site Management is from 2001, but lots is still relevant. There is a good explanation of the author's regex. This also explains how to search CPAN for modules that might be appropriate for your task.
in reply to webserver common log format file script
In Perl, it is not necessary to write things like $values[ 6 ]. Instead, Perl has list slice. See slices in http://perldoc.perl.org/perldata.html. In other languages, you have to keep track of stuff like the "sixth thing" or index 6 means status, in Perl, just assign to a $status variable directly: ($status) = (split); This enhances readability.
Anyway, I would use some well known code or use a CPAN module to parse your log line. Then it would help if you explained a bit more about your troubles. You obviously seem to to understand the basics of regex. Where are you going wrong?