in reply to RFC: How to survive your first few months of Perl

  1. Use strict and warnings!
  2. diagnostics
  3. perldoc -f
  4. YAPE::Regex::Explain
  5. perl -MO=Deparse and perl -MO=Deparse,p (B::Deparse)
  6. perldoc -l Some::Module | xargs less

Replies are listed 'Best First'.
Re^2: RFC: How to survive your first few months of Perl
by graff (Chancellor) on Nov 12, 2008 at 02:48 UTC
    perldoc -f

    In my first few months of using Perl (back in 1995), I cannot tell you how much time I would have saved if I had known about this option on perldoc. Initially, I was learning by adapting code that someone else had written, so in the course of a day, I ran "perldoc perlfunc" repeatedly to look up the details on function calls, and I was constantly paging down to the function of interest...

    UPDATE: On second thought, I have to admit that I learned a lot more about perl (and grew to appreciate it more quickly) by virtue of spending so much time with the "perlfunc" man page.

Re^2: RFC: How to survive your first few months of Perl
by MidLifeXis (Monsignor) on Nov 11, 2008 at 16:44 UTC
    perldoc -l Some::Module | xargs less

    How about perldoc -m Some::Module instead?

    --MidLifeXis

      If you define PERLDOC_PAGER=less or PAGER=less in your environment, say in .bashrc or the equivalent, it works fine. Otherwise perldoc will use more as a pager, which works, but doesn't know how to scroll backwards. That's sad.

        It all depends on your unix environment / version of more. HP-UX more handles paging backwards just fine, for example. I would agree that not being able to page backwards is a pain, but it is not a generic more problem, but rather a problem with the more program on specific distributions.

        --MidLifeXis

Re^2: RFC: How to survive your first few months of Perl
by cog (Parson) on Nov 12, 2008 at 10:58 UTC
    Use strict and warnings!

    Doh! I was missing the obvious :-)