Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • if you also want to say something like:

    my $house = %house{87};

    when the data is stored in a hash?

    Here is why I ask...

    I also had the problem (at first) with the array slice. I thought initially that it was a sigil issue and an issue with semantics. (As you have explained)

    But, I noticed that I did not have the issue with a hash. It seemed to me that if the sigil was causing me to have a semantic problem that the problem would carry to other cases... but, in my case... it did not.

    So, I thought about it so

    • That's an interesting point: the immediate punishment of mistakes fixes habits quicker than things seeming to work. I certainly have seen the mistake made more often with arrays than hashes.

      The warnings pragma catches this misuse nowadays, but many beginners either don't know about it or don't use it.

      Unfortunately, I didn't learn hashes until I had already familiarised myself with arrays, so I can't answer your first question.