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__

In reply to Re: How to read zipped file in perl by Anonymous Monk
in thread How to read zipped file in perl by Perlseeker_1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.