How can i store two Via in the two keys(Via and Via1) of hash. So that when i will give print $cnf{Via};
  1. PLEASE put the subject of your posts in their Subject;
  2. The two "Via" lines match the same regex, thus I would change the logic of the program to record all possible matches instead of storing the last one, i.e. possibly change
    $cnf{$c}=$_;
    to
    push @{ $cnf{$c} }, $_;
    of course you may need a more complex setup such that entries that can only occur once are stored as plain scalars and entries that can occur multiple times are stored as arrayrefs.
  3. the code you posted seems to suggests the reuse of someone else's code with very few clues about what it really does, thus I recommend getting acquainted with at least the very basics of Perl as you may find in any introductory book or tutorial.

  4. In reply to Re: How can I store two values with the same key in a hash? by blazar
    in thread How can I store two values with the same key in a hash? by sanjay nayak

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



  5. Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  6. Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  7. Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  8. Please read these before you post! —
  9. 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
  10. 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;
  11. Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  12. See Writeup Formatting Tips and other pages linked from there for more info.