Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Perl / Python Quick Reference? [closed]

Tags:

python

perl

I am reasonably fluent in writing perl / python scripts, but still while writing code, I find myself frequently using google to look up the exact order of operands of some built-in function, or the exact name of some feature I know exists. While google works reasonably well, it does take some searching, and about half the time, the reference page doesn't have the right examples that I need.

Does anyone know of any good quick reference for perl or python that would have most of the important usage information and basic examples in one place ? Should I make my own ? Or do most people use IDEs and don't need this kind of help ? (I use vim, BTW).

Thanks!

like image 920
sgauria Avatar asked Dec 04 '22 00:12

sgauria


2 Answers

Most well written python code should have docstrings that provide information on modules and functions simply by entering help into the interpreter.

>>> help(str)
>>> (lots of helpful output here!)
like image 79
Aesthete Avatar answered Dec 24 '22 07:12

Aesthete


For Perl, it's perldoc

perldoc Module::Name  # display docs for Module::Name
perldoc -f substr     # display docs for substr()
perldoc -Q parse      # search the FAQ for "parse"
perldoc -v %+         # display docs for special variable %+
perldoc perlcheat     # overview of most important syntax
perldoc perl          # overview of interesting perldoc pages
like image 29
Andy Lester Avatar answered Dec 24 '22 07:12

Andy Lester