tphyahoo has asked for the wisdom of the Perl Monks concerning the following question:

O wise ones, hear my plea for Help! In the map documentation we have
%hash = (); foreach $_ (@array) { $hash{getkey($_)} = $_; }
What does getkey do here? I tried in perloc, asked on chatterbox, and no one seems to be able to tell me. But this is in the core documentation. Am I missing something obvious?

This is a question about the perldoc as much as it is about anything else.

Is there some way I can search everything on perldoc, and grep out the few lines that may be of relevance, rather than going fishing on chatterbox or posting in desperation?

Note: bart thinks this might be term::getkey but that seems wrong.

Replies are listed 'Best First'.
Re: perldoc question (how to get info on getkey)
by Joost (Canon) on Feb 04, 2005 at 12:24 UTC
Re: perldoc question (how to get info on getkey)
by merlyn (Sage) on Feb 04, 2005 at 12:20 UTC
Re: perldoc question (how to get info on getkey)
by aquarium (Curate) on Feb 04, 2005 at 12:24 UTC
    looks like pseudocode to me. there's no such function in 5.8.3. if you actually test by putting something into @array before the loop (so that the loop executes), then you'll see the perl error "subroutine getkey not defined"
    the hardest line to type correctly is: stty erase ^H