How to find the info from documentation quickly??

H

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?

Thank you very much

Dean
 
S

Simon Taylor

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
 
S

Simon Taylor

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
 
N

Nicholas Dronen

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
 
T

Tassilo v. Parseval

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
 
T

Tad McClellan

hou said:
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.
 
L

Louis Erickson

: :>
:> > 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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,479
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top