Results 1 to 3 of 3

Thread: difference between hash and hash ref in perl

  1. #1
    Join Date
    Apr 2005
    Beans
    849

    difference between hash and hash ref in perl

    Could someone elaborete on the difference between hash's and hash references in perl.

    And when to use what?

    Thanks in advance

  2. #2
    Join Date
    Feb 2007
    Beans
    2,729

    Re: difference between hash and hash ref in perl

    A hash is a basic data type in Perl. It uses keys to access its contents.

    A hash ref is an abbreviation to a reference to a hash. References are scalars, that is simple values. It is a scalar value that contains essentially, a pointer to the actual hash itself.

    Got it?

    MrC

  3. #3
    Join Date
    Apr 2005
    Beans
    849

    Re: difference between hash and hash ref in perl

    yes,
    pointer was the magic word
    thanks.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •