473,404 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

[perl-python] 20050113 looking up syntax

while programing in Python, one can lookup syntax or info for keywords
or modules within Python.

In the command line, type

python

to get into the python interactive program. then type
help()
From there one can type any keyword or module name to find out the

syntax or info. Everything is self-contained and self-explanatory.

to exit help, type control-d.

if you haven't tried already, you can type 1+1 while running python.
The result will be displayed interactively. So in this way, Python can
be used as a calculator.

---------------------

for perl syntax lookup, use perldoc in the command line. For example:
perldoc perl

use 'perldoc -f functionName' for specific function. example:
perldoc -f qq

note that keywords cannot be looked up with -f. For basic keywords like

if, while..., use
perldoc perlop

Master 'perldoc perl' as a way to get familiar of what info are
available and what subroutine or aspect of perl is in what section of
the documentation associated with what documentation name abbreviation.

Master 'perldoc perldoc' to know all its power of options and
flexibility. If you use emacs, in particular you want to add the -t
option. Master the unix text editor vi to learn the navigation system
of perldoc. The basics are: control-f for page down, control-v for page

up, q for exit. Also, one may wish to peruse 'perldoc perlfaq' to
acquaint yourself about the preamble of nine volumes of perl's FAQ.

---------------------------

Note: this post is from the Perl-Python a-day mailing list at
http://groups.yahoo.com/group/perl-python/
to subscribe, send an email to pe*******************@yahoogroups.com
if you are reading it on a web page, program examples may not run
because they've been changed by yahoo.com or google.com.
Xah
xa*@xahlee.org
http://xahlee.org/PageTwo_dir/more.html

Jul 18 '05 #1
4 1451
Xah Lee wrote:
[snip]
Note: this post is from the Perl-Python a-day mailing list at
http://groups.yahoo.com/group/perl-python/
to subscribe, send an email to pe*******************@yahoogroups.com


So why duplicate the posts by posting them to the newsgroups?
Now that you've advertised the mailing list (and thank you,
I'll be sure to hurry off now and subscribe) there's no longer
any reason to post to the newsgroups, is there? Please?

-Peter
Jul 18 '05 #2
Xah Lee wrote:
---------------------

for perl syntax lookup, use perldoc in the command line. For example:
perldoc perl
Wrong. That command will give you a high-level overview of Perl but tell you
nothing about the syntax.
To lookup the Perl syntax you would have to use

perldoc perlsyn
use 'perldoc -f functionName' for specific function. example:
perldoc -f qq
BS. That will tell you what a function does, it doesn't tell you anything at
all about the syntax of Perl.
BTW: Why on earth are you using qq() as an example? That doc page just
points you to 'perldoc perlop'.
note that keywords cannot be looked up with -f. For basic keywords
like

if, while..., use
perldoc perlop


BS. What gave you the idea that keywords were operators? Of course keywords
can be found where they belong, in the syntax definition of the language,
but not in the operator section of the documentation.

Why don't you just stop posting this nonsense?

jue

Jul 18 '05 #3
Jürgen Exner wrote:
Why don't you just stop posting this nonsense?


He will, fairly soon. I'm suspecting that the original
intent behind these posts was to stir up a perl vs python
flamewar. That is unlikely to materialize since the
poster does not seem to understand neither of these
languages.

I.
Jul 18 '05 #4
Peter Hansen wrote:
So why duplicate the posts by posting them to the newsgroups?


Because he's a well-known pest.

--
Erik Max Francis && ma*@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Yes I'm / Learning from falling / Hard lessons
-- Lamya
Jul 18 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mark Wilson CPU | last post by:
This must be easy, but I'm missing something... I want to execute a Perl script, and capture ALL its output into a PHP variable. Here are my 2 files: -------------------------------------...
6
by: John Smith | last post by:
Hello, I have a rather odd question. My company is an all java/oracle shop. We do everything is Java... no matter what it is... parsing of text files, messaging, gui you name it. My question...
3
by: David F. Skoll | last post by:
Hi, I'm tearing my hair out on this one. I'm trying to embed a Perl interpreter into a C program. I need to be able to create and destroy the interpreter periodically, but will never actually...
1
by: Julia Bell | last post by:
I would like to run the same script on two different platforms. The directory in which the script(s) will be stored is common to the two platforms. (I see the same directory contents regardless...
1
by: smsabu2002 | last post by:
Hi, I am facing the build problem while installing the DBD-MySql perl module (ver 2.9008) using both GCC and CC compilers in HP-UX machine. For the Build using GCC, the compiler error is...
13
by: Otto J. Makela | last post by:
I'm trying to install to php the Perl-1.0.0.tgz package (from http://pecl.php.net/package/perl, enabling one to call perl libraries) to a pre-existing Solaris system. Unfortunately, the attempt...
21
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Uploading files from a local computer to a remote web server has many useful purposes, the most...
223
by: Pilcrow | last post by:
Given that UNIX, including networking, is almost entirely coded in C, how come so many things are almost impossible in ordinary C? Examples: Network and internet access, access to UNIX...
4
by: vijayarl | last post by:
Hi All, i have the following software installed in my system : 1.OS: Win2k 2.Eclipse Version used :3.4.0 & even the perl too... 1. I have imported the my own perl project in Eclipse, when i...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.