in reply to Re: Help me understand this idiomatic hash from array code
in thread Help me understand this idiomatic hash from array code

In my opinion, the first code example is unnecssarily complicated – notice that it “sent you to Camel book, to no avail.” It all comes down to this, and could have been stated in just this way: %fields = { id => 0, name => 1, age => 2};

It all comes down to, the information the OP already provided?

How can you be confused about what the OP knows when you're actively copy/pasting what he knows?

Calling a hash slice "unnecssarily complicated" is very silly and very telling

because future bug-sleuths will naturally tend to read the human comment and not verify that the code in fact matches it.)

Thats what non-programmers naturally do because they can't read code

Programmers would ignore the comments and read the code

  • Comment on Re^2: Help me understand this idiomatic hash from array code