How can I use hashmap in perl?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bhavanirayala
    New Member
    • Jul 2007
    • 25

    How can I use hashmap in perl?

    Hi,

    How can I create hashmap object and how do i put the values in hashmap in perl.
    First of all is it possible or not?
  • KevinADC
    Recognized Expert Specialist
    • Jan 2007
    • 4092

    #2
    There is no such thing as a hashmap in perl, maybe you are confusing the teminology with java or something else. You can create a hash with perl and use the hash for whataver you need. But your question is too vague to answer and I see you have cross-posted this question with much more detail on another forum so continuing the discussion here is not going to be productive. Here is a link for beginning perl coders:

    http://www.perl.org/books/beginning-perl/

    Comment

    • numberwhun
      Recognized Expert Moderator Specialist
      • May 2007
      • 3467

      #3
      Heck, if you are going to cross post, the least you could do is post the same information instead of expecting the experts here to read your mind about what you want to do. Its only fair you know. But, I fully agree with Kevin that you shouldn't be cross posting. Many of us tend to read multiple forums and are pretty good at noticing a cross post.

      Regards,

      Jeff

      Comment

      • Alex Hanin
        New Member
        • Jul 2010
        • 1

        #4
        Originally posted by bhavanirayala
        Hi,

        How can I create hashmap object and how do i put the values in hashmap in perl.
        First of all is it possible or not?
        You can create hashmap as
        my %myhash=();

        Populate as
        $myhash{ 'key' } = 'value'; # hash

        Get value
        $value = $myhash{ 'key' };

        Comment

        Working...