Neither, it is my $line = @_; that is the problem. An array assigned to a scalar gives the number of elements in the array.
What you should do is either the assignment you weren't sure about (but aren't actually using):my $line = $_;
Or, a list assignment: my( $line ) = @_;
Or, use shift:my $line = shift;
You should also drop the & from your subroutine calls. Ie. &process_file ($file); should be process_file( $file );