in reply to New to Perl
Also, if you are trying to grab lines based on the number of fields, you could do:
do_something_with($line) if (@{[split / /, $line]} == 3);
... to grab all of the lines that have 3 fields in them.
The following is a little faster, but throws a warning:
do_something_with($line) if ((scalar split / /, $line) == 3);
Of course, if you are looking at more than the number of fields, these won't be useful ...
--jrtayloriv