Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > How to find the info from documentation quickly??

Reply
Thread Tools

How to find the info from documentation quickly??

 
 
hou
Guest
Posts: n/a
 
      08-11-2003
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
 
Reply With Quote
 
 
 
 
Simon Taylor
Guest
Posts: n/a
 
      08-11-2003

> 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


 
Reply With Quote
 
 
 
 
Simon Taylor
Guest
Posts: n/a
 
      08-11-2003
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

 
Reply With Quote
 
Nicholas Dronen
Guest
Posts: n/a
 
      08-11-2003
Simon Taylor <(E-Mail Removed)> 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
 
Reply With Quote
 
Tassilo v. Parseval
Guest
Posts: n/a
 
      08-11-2003
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$&."'!#+sexisexi ixesixeseg;y~\n~~dddd;eval
 
Reply With Quote
 
Gregory Toomey
Guest
Posts: n/a
 
      08-11-2003
"hou" <(E-Mail Removed)> wrote in message
news:bh6rcm$eu$(E-Mail Removed)...
> Hello everyone,
> I am new to perl. How can I get the information I need quickly from
> the perl documentation??


I look at http://perldoc.com/ & http://www.rexswain.com/perl5.html

gtoomey


 
Reply With Quote
 
Tad McClellan
Guest
Posts: n/a
 
      08-11-2003
hou <(E-Mail Removed)> 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
http://www.velocityreviews.com/forums/(E-Mail Removed) Perl programming
Fort Worth, Texas
 
Reply With Quote
 
Louis Erickson
Guest
Posts: n/a
 
      08-11-2003
Bill Smith <(E-Mail Removed)> wrote:

: "Tad McClellan" <(E-Mail Removed)> wrote in message
: news:(E-Mail Removed)...
:> hou <(E-Mail Removed)> 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 - (E-Mail Removed) - http://www.rdwarf.com/~wwonko/

"I don't care who does the electing as long as I get to do the
nominating" -- Boss Tweed
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
converting XSD documentation to HTML documentation kev.sully@gmail.com XML 1 09-16-2006 12:09 PM
Find.find does not find orphaned links? Wybo Dekker Ruby 1 11-15-2005 02:50 PM
Python documentation: How about structured documentation? Looking for comments/suggestions Kenneth McDonald Python 2 05-06-2004 04:11 AM
Principles of documentation (was: Python Documentation Blows!) Cameron Laird Python 1 04-03-2004 06:54 PM



Advertisments