in reply to Re: Using Positions from one array to find the value in the same position of another.
in thread Using Positions from one array to find the value in the same position of another.

Like i said i am a learner so although i dont complete follow everything there i think i see what your doing.
Correct me if i am wrong but you are creating a dictionary of words for values and for keys an array foreach number $#dict though i am not sure what map does. Then i also think you have implemented an error code for unrecognised words not in @dict?
  • Comment on Re^2: Using Positions from one array to find the value in the same position of another.

Replies are listed 'Best First'.
Re^3: Using Positions from one array to find the value in the same position of another.
by AnomalousMonk (Archbishop) on Apr 29, 2016 at 21:32 UTC
    ... i am not sure what map does.

    See map. (Update: See also Map: The Basics in the Tutorials section.)

    ... creating a dictionary of words for values and for keys an array foreach number $#dict ...

    @dict is an array of all the words known to the program.  %encode is a hash associating any (known) word to its index in the  @dict array, with error handling.

    ... i ... think you have implemented an error code for unrecognised words ...

    Yes.


    Give a man a fish:  <%-{-{-{-<