in reply to How to read zipped file in perl

Any ideas on this is helpful

I have some ideas :)

The title of your question has nothing to do with output what I am Expecting is -- you seem to be reading the zipped file just fine

The output what I am Expecting is has nothing to do with the output you get

So, maybe, try to write some code to get output what I am Expecting is and pretend like the part thats working doesn't exist, like this

#!/usr/bin/perl -- use strict; use warnings; use Data::Dump qw/ dd /; open my($handle), '<:raw', \' 01,AB1,CDEF,CHINA,T1, 02,AB2,CDEF,CHINA,T1, 03,AB1,CDEF,JAPAN,T2, 04,AB2,CDEF,JAPAN,T2, 05,AB3,CDEF,JAPAN,T2, 06,AB4,CDEF,JAPAN,T2, 07,AB3,CDEF,CHINA,T1, 08,AB4,CDEF,CHINA,T1, 09,AB1,CDEF,CHINA,T1, 10,AB2,CDEF,CHINA,T1, 11,AB1,CDEF,JAPAN,T2, 12,AB2,CDEF,JAPAN,T2, 13,AB3,CDEF,JAPAN,T2, 14,AB4,CDEF,JAPAN,T2, 15,AB3,CDEF,CHINA,T1, 16,AB4,CDEF,CHINA,T1, '; my %result; while( <$handle>){ my @fudge = join '|', ( split /\|/, $_ )[4] ; dd( $_ => \@fudge ); $result{$_}++ for @fudge; dd( \%result ); } dd( \%result ); __END__