How to find the info from documentation quickly??

Discussion in 'Perl Misc' started by hou, Aug 11, 2003.

  1. hou

    hou Guest

    Hello everyone,
    I am new to perl. How can I get the information I need quickly from
    the perl documentation??

    For example:
    Now I am confused with function "glob" and "*INPUT = *STDIN".
    I typed "perldoc -q typeglob", but I got nothing.

    Would you please share some experiences with me?

    Thank you very much

    Dean
    hou, Aug 11, 2003
    #1
    1. Advertising

  2. hou

    Simon Taylor Guest


    > I am new to perl. How can I get the information I need quickly from
    > the perl documentation??
    >
    > For example:
    > Now I am confused with function "glob" and "*INPUT = *STDIN".
    > I typed "perldoc -q typeglob", but I got nothing.
    >
    > Would you please share some experiences with me?


    Happy to.

    Try:

    perldoc -f glob
    perldoc File::Glob
    perldoc -q glob

    Simon Taylor
    Simon Taylor, Aug 11, 2003
    #2
    1. Advertising

  3. hou

    Simon Taylor Guest

    Hello Dean,

    > Actually, my question was "what is the first(,second,and third...)
    > thing I need to do in order to find info quickly using perldoc?".
    >
    > You are an experienced programmer, so you know where to locate
    > information you need. But I am just a newbie, how do I know
    > I should look for File::Glob?
    >
    > I mean, there should be a way to narrow down the search when I
    > encounter any type of question in perl.
    > So I won't waste the space here by asking some very basic question
    > ,which I could find in perldoc.


    Well in this specific case, it was the perldoc for the glob function
    itself that told me to look into File::Glob.

    Yours is a tough question to answer.

    Unconsciously I probably follow a heirarchy like this:

    1. The perl cookbook. This is by far the most heavily used
    reference book in our office, it's great.

    2. If I'm looking for documentation on a function, I know that I can
    use the perldoc "-f" flag, as in perldoc -f functionname.

    3. If I suspect that there may be something in the perl FAQs on the
    topic, I'll use the perldoc "-q" flag, as in perldoc -q array

    I hope this helps

    Simon Taylor
    Simon Taylor, Aug 11, 2003
    #3
  4. Simon Taylor <> wrote:
    ST> Hello Dean,

    >> Actually, my question was "what is the first(,second,and third...)
    >> thing I need to do in order to find info quickly using perldoc?".
    >>
    >> You are an experienced programmer, so you know where to locate
    >> information you need. But I am just a newbie, how do I know
    >> I should look for File::Glob?
    >>
    >> I mean, there should be a way to narrow down the search when I
    >> encounter any type of question in perl.
    >> So I won't waste the space here by asking some very basic question
    >> ,which I could find in perldoc.


    ST> Well in this specific case, it was the perldoc for the glob function
    ST> itself that told me to look into File::Glob.

    ST> Yours is a tough question to answer.

    ST> Unconsciously I probably follow a heirarchy like this:

    ST> 1. The perl cookbook. This is by far the most heavily used
    ST> reference book in our office, it's great.

    ST> 2. If I'm looking for documentation on a function, I know that I can
    ST> use the perldoc "-f" flag, as in perldoc -f functionname.

    ST> 3. If I suspect that there may be something in the perl FAQs on the
    ST> topic, I'll use the perldoc "-q" flag, as in perldoc -q array

    There's also the index in "perldoc perl" itself.

    Regards,

    Nicholas

    --
    "Why shouldn't I top-post?" http://www.aglami.com/tpfaq.html
    "Meanings are another story." http://www.ifas.org/wa/glossolalia.html
    Nicholas Dronen, Aug 11, 2003
    #4
  5. Also sprach hou:

    > Hello everyone,
    > I am new to perl. How can I get the information I need quickly from
    > the perl documentation??
    >
    > For example:
    > Now I am confused with function "glob" and "*INPUT = *STDIN".
    > I typed "perldoc -q typeglob", but I got nothing.
    >
    > Would you please share some experiences with me?


    If it's a builtin function (like glob()):

    perldoc -f function

    If you assume your problem might be covered in the FAQs:

    perldoc -q keyword

    where 'keyword' is actually a regex.

    For all other things you first need to find the manpage that deals with
    it. See 'perldoc perltoc'. If you scan this document for 'typeglob', the
    first hit would be

    perldata - Perl data types

    DESCRIPTION
    Variable names
    Context
    Scalar values
    Scalar value constructors
    List value constructors
    Slices
    Typeglobs and Filehandles
    SEE ALSO

    so you look up 'perldoc perldata'. If you want a terse overview over all
    the manpage and what they deal with, see 'perldoc perl'.

    Tassilo
    --
    $_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
    pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
    $_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval
    Tassilo v. Parseval, Aug 11, 2003
    #5
  6. Gregory Toomey, Aug 11, 2003
    #6
  7. hou <> wrote:

    > How can I get the information I need quickly from
    > the perl documentation??



    By grep()ing it for terms relevant to the current problem.


    > For example:
    > Now I am confused with function "glob" and "*INPUT = *STDIN".



    The term "glob" is overloaded, you have 2 different uses of the term there.

    The glob() function is a "filename glob".

    The *SOMETHING syntax is a "type glob".


    > Would you please share some experiences with me?



    (wrapped)

    http://groups.google.com/groups?as_umsgid=
    slrna1mmj4.bj1.tadmc%40tadmc26.august.net


    One further hint, try searching for "Glob" rather than "glob".

    Finding your term in a "headline", or at the beginning of a
    sentence, increases the chances of that being a good place to look.


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
    Tad McClellan, Aug 11, 2003
    #7
  8. Bill Smith <> wrote:

    : "Tad McClellan" <> wrote in message
    : news:...
    :> hou <> wrote:
    :>
    :> > How can I get the information I need quickly from
    :> > the perl documentation??
    :>
    :>
    :> By grep()ing it for terms relevant to the current problem.
    :>
    : --snip--

    : On my windows system, I use tcgrep from the "Perl Cookbook". I modified
    : it to do the file glob that Unix shells do for you. This is a very
    : powerful version of grep, but it is not very fast. Any other
    : suggestions?

    The Start button has a "Search" option with "Find Files Or Folders" or
    something like that, which is pretty good for finding phrases in documentation.
    It doesn't have regular expressions, but does okay otherwise.

    Visual Studio does have regular expressions, but most people regard that as
    overkill. I am not among that group. It's a fine text editor, althuogh
    I've been using vim lately.

    There are many ports of the standard grep to Windows; Google will be
    your friend. The GNU web site may have some.

    Cygwin has one, but it may be more trouble than it's worth for this particular
    task.

    Personally, I think your Perl solution a good and very portable one.

    --
    Louis Erickson - - http://www.rdwarf.com/~wwonko/

    "I don't care who does the electing as long as I get to do the
    nominating" -- Boss Tweed
    Louis Erickson, Aug 11, 2003
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Cameron Laird
    Replies:
    1
    Views:
    654
    Josiah Carlson
    Apr 3, 2004
  2. www
    Replies:
    3
    Views:
    636
    Daniel Pitts
    Jan 27, 2007
  3. wang frank

    how to find a lable quickly?

    wang frank, May 4, 2007, in forum: Python
    Replies:
    3
    Views:
    292
    Duncan Booth
    May 4, 2007
  4. C C++ C++
    Replies:
    11
    Views:
    5,558
    James Kanze
    Jan 17, 2008
  5. bwv549
    Replies:
    11
    Views:
    241
    Hugh Sasse
    Nov 7, 2008
Loading...

Share This Page