in reply to Re^2: Arrow operator usage in perl
in thread Arrow operator usage in perl

Here is the hash reference:
$hwwns->{$hwpath} = $hwwn;

Even if the reference was not used before, Perl will happily create a new one for you. The process is called "autovivification".

لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re^4: Arrow operator usage in perl
by dvinay (Acolyte) on Nov 09, 2013 at 19:02 UTC

    So the concept is new to me, so can you please explain

    what is happening in my piece of code

      So have you read the documentation I linked to?
      لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
      "So the concept is new to me, so can you please explain..."

      OK, yet another answer with no code :-(

      When i had my first impact with Perl some years ago, i got stuck, what else.

      So i bought a book and started reading. This was the way i did it.

      I'm not a friend of this "self-taught, reverse-engineering is good bla, bla" approach. One needs sometimes a good advice.

      But before this, there must be a personal effort... AKA RTFM

      This is my recommendation - to you.

      Update:

      Oops, i published too fast...sorry.

      Regards, Karl

      «The Crux of the Biscuit is the Apostrophe»