Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Where's the doc. on perl command-line options?

Reply
Thread Tools

Where's the doc. on perl command-line options?

 
 
John Doe
Guest
Posts: n/a
 
      08-31-2004
For example, I need to know what "perl -an" does. It's not in the
"man perl" page. Could not find it at perl.org or Perlmonks.
Google-searched comp.lang.perl.* for things like "command line
switches," "command line arguments," and "command line options," only
to find info on argument processing. [SARCASM] I admit that anyone
with half a brain should be able to divine which of the 90 (count 'em,
ninety) core documentation modules has what I seek: [/SARCASM]
perl
perltoc
perlreftut
perldsc
perllol
perlrequick
perlretut
perlboot
perltoot
...etcetera, but maybe one of you gurus can clue me in.
 
Reply With Quote
 
 
 
 
Sam Holden
Guest
Posts: n/a
 
      08-31-2004
On 31 Aug 2004 00:14:25 -0700, John Doe <(E-Mail Removed)> wrote:
> For example, I need to know what "perl -an" does. It's not in the
> "man perl" page. Could not find it at perl.org or Perlmonks.
> Google-searched comp.lang.perl.* for things like "command line
> switches," "command line arguments," and "command line options," only
> to find info on argument processing. [SARCASM] I admit that anyone
> with half a brain should be able to divine which of the 90 (count 'em,
> ninety) core documentation modules has what I seek: [/SARCASM]


> perl


If you actually read that one you'll find the line:

perlrun Perl execution and options

Since "-an" is an option that seems to a pointer to the place to
look. If you don't know what an "option" (in the domain of
"execution") is then your OS documentation has failed).

> perltoc


This one contains:

perlrun - how to execute the Perl interpreter


SYNOPSIS
DESCRIPTION
#! and quoting on non-Unix systems
OS/2, MS-DOS, Win95/NT, Macintosh, VMS

Location of Perl
Command Switches
-0[octal/hexadecimal], -a, -C [number/list], -c, -d,
-d:foo[=bar,baz], -Dletters, -Dnumber, -e commandline,
-Fpattern, -h, -i[extension], -Idirectory, -l[octnum],
-m[-]module, -M[-]module, -M[-]'module ...',
-[mM][-]module=arg[,arg]..., -n, -p, -P, -s, -S, -t, -T,
-u, -U, -v, -V, -V:name, -w, -W, -X, -x directory

Which not only points to the appropriate documentation but contains the
two switches in the description (-a and -n).


> perlreftut
> perldsc
> perllol
> perlrequick
> perlretut
> perlboot
> perltoot
> ...etcetera, but maybe one of you gurus can clue me in.


None of those have anything to do with the example question, so
looking in them is just silly.

The first two places were the obvious starting points, since they
contain references to the places where the real documentation is,
and as shown above contain what you want if you bother reading them.

You aren't supposed to randomly select a few of the "90" manuals.
You check the overview and the table of contents, just like you
would with any other reference material. You don't just turn to
random pages when trying to find a car mechanic in the phone book,
do you?

--
Sam Holden
 
Reply With Quote
 
 
 
 
Anno Siegel
Guest
Posts: n/a
 
      08-31-2004
John Doe <(E-Mail Removed)> wrote in comp.lang.perl.misc:
> For example, I need to know what "perl -an" does. It's not in the


perldoc perlrun

> "man perl" page. Could not find it at perl.org or Perlmonks.
> Google-searched comp.lang.perl.* for things like "command line
> switches," "command line arguments," and "command line options," only
> to find info on argument processing. [SARCASM] I admit that anyone
> with half a brain should be able to divine which of the 90 (count 'em,
> ninety) core documentation modules has what I seek: [/SARCASM]


The table of contents is perltoc. Looking for "Command Switches" there
finds perlrun.

Anno
 
Reply With Quote
 
A. Sinan Unur
Guest
Posts: n/a
 
      08-31-2004
http://www.velocityreviews.com/forums/(E-Mail Removed) (John Doe) wrote in
news:(E-Mail Removed) om:

> For example, I need to know what "perl -an" does. It's not in the
> "man perl" page. Could not find it at perl.org or Perlmonks.
> Google-searched comp.lang.perl.* for things like "command line
> switches," "command line arguments," and "command line options," only
> to find info on argument processing. [SARCASM] I admit that anyone
> with half a brain should be able to divine which of the 90 (count 'em,
> ninety) core documentation modules has what I seek: [/SARCASM]


Of course, perldoc perlrun, as others have pointed out, contains the
documentation. And you need not divine anything, you can always check
perldoc perltoc to find out.

However, I am curious, did you even try

perl --help

Usage: C:\Perl\bin\perl.exe [switches] [--] [programfile] [arguments]
....
-a autosplit mode with -n or -p (splits $_ into @F)
....
-n assume 'while (<>) { ... }' loop around program

before resorting to sarcasm?

--
A. Sinan Unur
(E-Mail Removed)d
(remove '.invalid' and reverse each component for email address)

 
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
FAQ 2.17 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? PerlFAQ Server Perl Misc 0 04-04-2011 10:00 PM
FAQ 1.4 What are Perl 4, Perl 5, or Perl 6? PerlFAQ Server Perl Misc 0 02-27-2011 11:00 PM
FAQ 2.17 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org? PerlFAQ Server Perl Misc 0 02-03-2011 11:00 AM
FAQ 1.4 What are Perl 4, Perl 5, or Perl 6? PerlFAQ Server Perl Misc 0 01-23-2011 05:00 AM
Perl Help - Windows Perl script accessing a Unix perl Script dpackwood Perl 3 09-30-2003 02:56 AM



Advertisments