Anyone have a favorite reference manual?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi All,

    For programming in Perl on a Linux platform, does anyone
have a favorite on line reference manual?

Many thanks,

Re: Anyone have a favorite reference manual?

Quoted text here. Click to load it

Anything wrong with perldoc?  

Contrary to dead trees (which you are not asking for) and web-based
manuals it actually reflects the specific Perl version that is installed
on your computer.


Re: Anyone have a favorite reference manual?

On 07/08/2015 10:11 PM, J�rgen Exner wrote:
Quoted text here. Click to load it

Not to ask too stupid a question, but where do I
find this?  (Remember I am a beginner.)

Re: Anyone have a favorite reference manual?

On 07/08/2015 10:20 PM, T wrote:
Quoted text here. Click to load it

Found it.  :-)

Re: Anyone have a favorite reference manual?

On 09/07/15 05:52, T wrote:
Quoted text here. Click to load it

You say in a later post that you are a beginner.  I've been a beginner  
and then, by process of learning, a competent programmer in numerous  
languages with different design philosophies, including Algol, PL/1,  
Assembler, FORTRAN, Java, APL and Perl.

I can't explain why, but of these I found Perl the hardest to learn  
_from a reference manual_.  It's perfectly possible to learn how to make  
code work that way, but to write Perl that looks like Perl, rather than  
code from some other language implemented via the Perl compiler, you  
need (a) a book oriented at learning, and (b) numerous code examples.

So you ask a good question; but it's not the only one nor even the most  
important, in my opinion.

PS I like perldoc, via the HTML pages which you should find somewhere  
like file:///usr/share/doc/perl-doc-html/html/index.html


Henry Law            Manchester, England

Re: Anyone have a favorite reference manual?

Quoted text here. Click to load it


Quoted text here. Click to load it

Statement in favour of the (almost) exact opposite: I think it's fairly
easy to learn Perl from the reference manual for someone who has enough
of a background in general programming concepts and a few other
languages. This will enable someone doing it to write code which works
(after all, that's the point of the exercise), gradually using more and
more features of the language as familiarity with it increases (looking
at my Perl from, say, eight years ago, makes me cringe but it's working
code nevertheless).

Perl not only supports all 'major' programming paradigms to some degree
but also a wide variety of writing styles. People tend to have
problems when reading code written in a style different from the one
they use themselves and because of this, 'style zealotry' is a common
phenomenon (nobody likes being confonted with things he doesn't
understand [easily]). IMHO, it's best to ignore this most of the time:
Developing a style which works for oneself is much more important than
adhering to other people's more or less random preferences. But
preferably without becoming religious about it: Other people's
preferences are usually inherently sensible, too, just from a different
perspective and there are also situations where a certain style is
effectively mandatory.

Re: Anyone have a favorite reference manual?

On 07/09/2015 08:10 AM, Rainer Weikusat wrote:
Quoted text here. Click to load it

I even forcer myself to use Modula2 style i bash script.  I do
so because it makes it easier on me to go back later and
maintain the thing.

I also use a lot of extra line to try to make it self
documenting, instead of trying to put the sun, the moon,
and the stars all on the same line.

Thank you for helping me with this.

Re: Anyone have a favorite reference manual?

On 7/8/2015 21:52, T wrote:
Quoted text here. Click to load it

I like to just use the pods for reference.  I combine them into a
single text file and use gvim to search for what I want.  Since
it's less than 120 lines, I'll insert it here.  You can add sections
to %do_not_want hash to remove from final product (eg: 'perl56delta' => 1, )
or you can build want you want in @sections/%sections.

If you'd have given an email, I would have sent direct and avoided the
usenet overhead.

I would read these first 5 or so in their entirety to get started:
   'perlsyn' => 'Perl syntax'
   'perldata' => 'Perl data structures'
   'perlop' => 'Perl operators and precedence'
   'perlsub' => 'Perl subroutines'
   'perlfunc' => 'Perl builtin functions'
then peruse the rest at your leisure.

/* ------------------------------------------------------------------ */

#!perl -sw --

use strict;
use Config;
use Pod::Text;
use Data::Dumper; $Data::Dumper::Indent=1; $Data::Dumper::Sortkeys=1;

# make perl manual from pods into single text file
# Usage: perl >
# copyright 2001 $Bill - you may use/modify freely for personal use
# Ignore any errors you may get from pod2text conversion module

use vars qw($h $help $s $d);

my $pod_dir = "$Config/pod";    # directory where core pod files are
$pod_dir = "$Config/pods" if $] > 5.008;

my @extra_pods = ();        # other pod file dirs to check - add your own
# push @extra_pods, "$Config/pod" if $] <= 5.008;
# push @extra_pods, "$Config/pods" if $] > 5.008;

print <<EOD and exit 0 if $h or $help;

Combines all of the Perl man pages into a single file for searching
and reference.  Should generate a lot of format errors.

Usage: $0 [-s] [<pod-dir>] [>]
    -s        silent (no progress lines)
    pod-dir        optional directory in which to find pod files


$| = 1;

# core sections and ones to skip
my @sections = ();    # built automatically in main if empty (section order)
my %sections = ();    # built automatically in main if empty (section hdrs)
my %do_not_want = ();    # Ones I don't want in my manual

# get core sections (not language or platform specific)
get_sections () if not @sections;

# add your language specific section since I skipped Language-Specific
# section - see perl.pod source for choices - win32 is done here allready
if ($^O =~ /Win32/i) {
    push @sections, 'perlwin32';
    $sections = 'Perl notes for Windows';

my %pods;
opendir DIR, $pod_dir or die "Error on opendir $pod_dir: $!\n";
while (defined ($_ = readdir DIR)) {
    next if !/\.pod$/;
    $pods = 1;
closedir DIR;

# get the core sections in order
foreach my $section (@sections) {

    my $sect_hdr = $sections;

    # skip sections I don't want
    if (exists $do_not_want) {
        print STDERR "Skipping $section Section\n" if !$s;
    print STDERR "Doing $section '$sect_hdr'\n" if !$s;

    # skip if couldn't find pod for section
    if (not exists $pods) {
        print STDERR "$section section missing\n";

    printf "\n%-20.20s  %s\n\n", $section, $sect_hdr;
    pod2text ("-80", "$pod_dir/$section.pod");
    delete $pods;


#- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

sub get_sections {

open IN, "$pod_dir/perl.pod" or die "open $pod_dir/perl.pod: $! ($^E)";
my $lines;
{ undef $/; $lines = <IN>; }
close IN;

# strip front and back of perl.pod
$lines =~ s/^.*?=head2 Overview>*?\n//is;
$lines =~ s/\s*=head2 Language-Specific.*$//is;
print (Data::Dumper->Dump([$lines], [qw($lines)])) if $d;

# grab sections from text from Overview down to before Language-Specific
foreach (split /\n/, $lines) {
    next if /^\s*$/;
    next if /^\s*=head2/;
    my @F = split ' ', $_, 2;
    push @sections, $F[0];
    $sections = $F[1];
print (Data::Dumper->Dump([\@sections], [qw(@sections)])) if $d;
print (Data::Dumper->Dump([\%sections], [qw(%sections)])) if $d;



Site Timeline