$ref = $hash_count ? \%hash : $array_count ? \@array : $ref_to_all_lines_in_file;