Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Information (or knowing where to find it) is key

by gri6507 (Deacon)
on Jun 01, 2004 at 13:18 UTC ( [id://358034]=perlmeditation: print w/replies, xml ) Need Help??

Fellow monks,

This discussion is directed more towards monks like myself, who have been taught (directly or self-inflicted) the language through trial and error without ever having learned the fundamentals.

Throughout my existance here at PerlMonks, I have seen (and selflessly contributed to) numerous questions to which an enlightened monk simply answered see perldoc perlre, perldoc perlretut, perldoc perlvar, perldoc perlsyn, etc.

I have always struggled to figure out how one desides in which perldoc pages should they look for the answer. The answer that I have come up with, that I hope may be useful to others like myself, is simply www.perldoc.com. There one can bluntly write a question and get a list of perldoc pages which are relevant.

  • Comment on Information (or knowing where to find it) is key

Replies are listed 'Best First'.
Re: Information (or knowing where to find it) is key
by tinita (Parson) on Jun 01, 2004 at 14:19 UTC
    i think that perlintro is a great start.
    by reading this you learn perl basics and you get directed to the more detailed perldoc pages of the section. and it can't be so difficult to miss perlintro, since it is listed as the second item in `man perl`.
    if you have digged through all this, usually it gets easier and easier to find the right perldoc page for your question. if in doubt, use your operating system functions. i wrote my own perldoc-grep, which is basically:
    exec("find", "/usr/lib/perl5/5.8.3", "-name", "*.pod", "-exec", "grep", "-H", "$ARGV[0]", "{}", ";");
    so i can say pdgrep '<<[A-Z]', which will find me the docs to here-documents.
Re: Information (or knowing where to find it) is key
by gjb (Vicar) on Jun 01, 2004 at 13:30 UTC

    Maybe it's better to familiarize oneself with the documentation by reading through it "diagonally". Just enough to know which document contains what. It takes some time, but I find it's worth the investment.

    Update: Incidently, reading through the docs you'll probably find a number of features you didn't know about, an added bonus ;)

    Just my 2 cents, -gjb-

      I'll second the suggestion to read the docs. I start working my way through the camel book every once in a while and always manage to pick up something I missed before.

      I've always tried to understand the concepts when learning something new. You can always look up the details.

      90% of every Perl application is already written.
      dragonchild
Re: Information (or knowing where to find it) is key
by sweetblood (Prior) on Jun 01, 2004 at 14:13 UTC
    I had spent several years playing with Perl and like you didn't take the time to really develop a solid foundation in the language. I have lots of experience in other languages and didn't think I'd really need to read the docs. As a result of this thinking, I floundered. It would take 3-4 times as long to write anything. Finally, I realized that I needed to buckle down and go to square one. I signed up for a beginners training class, even though I had been using Perl for years. I read the Camel and re-read Mastering Regex for the Perl slant having read it without Perl sometime back.
    Now, I get much more work done in less time and it's better Perl, not just how I might implement a C solution in Perl.
    It really isn't a question of "can I afford to spend the time getting a good foundation in the language" as "I can't afford not to get a good foundation."

    Good Luck in your efforts.
    Cheers

    Sweetblood

Re: Information (or knowing where to find it) is key
by Happy-the-monk (Canon) on Jun 01, 2004 at 22:16 UTC

    you can also try the   perldoc   that comes with Perl.
    To find answers to frequently asked questions, just type   perldoc -q some question or keywords here.

    Amazing, isn't it?

      Actually, if you know a little bit about the wording of what you're looking for, you may be better served by querying a regexp such as  perldoc -q 'intersect.*array' since the hits will be much more exact.
Re: Information (or knowing where to find it) is key
by Aragorn (Curate) on Jun 02, 2004 at 11:27 UTC
    To decide which perldoc page you need, you can try perltoc. From that page:
    DESCRIPTION

    This page provides a brief table of contents for the rest of the Perl documentation set. It is meant to be scanned quickly or grepped through to locate the proper section you're looking for.

    If you really don't know what you're looking for, then you have a problem. Reading a beginner's book like Learning Perl, maybe followed by Learning Perl Objects, References & Modules can help tremendously. Investing some time to get the basics down will prevent a lot of time-wasting (of both yourself and of other people) and frustration.

    When I'm learning a new language, out of habit I start with a tutorial on the language, for the express purpose to get a good foundation on which to build. Getting to know which book or web-article is a good start is another problem, but most of the time some research using Google can solve that one.

    Perl comes with an excellent body of documentation, both on-line and in dead-tree forms. Getting familiar with them will pay off handsomely in the longer term.

    Arjen

Re: Information (or knowing where to find it) is key
by bibo (Pilgrim) on Jun 02, 2004 at 20:11 UTC
    serendipity is a powerful force. many's the time when I have gone looking for X in the docs, and started reading about Y, which looks fascinating. And then a half hour is gone, and I cannot recall why X was so damn important anyway, and write up some neat bit of code using Y to prove to myself I understood it. Eventually the X of today becomes the Y of tomorrow, and I start knowing where to look! Hope this helps.... :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://358034]
Approved by tinita
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-24 19:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found