at http://faq.perl.org/ . The perlfaq-workers periodically post extracts
of the latest perlfaq to comp.lang.perl.misc.
-You can view the source tree at
-https://github.com/briandfoy/perlfaq (which is outside of the
-main Perl source tree). The git repository notes all changes to the FAQ
-and holds the latest version of the working documents and may vary
-significantly from the version distributed with the latest version of
-Perl. Check the repository before sending your corrections.
+You can view the source tree at https://github.com/briandfoy/perlfaq
+(which is outside of the main Perl source tree). The git repository
+notes all changes to the FAQ and holds the latest version of the
+working documents and may vary significantly from the version
+distributed with the latest version of Perl. Check the repository
+before sending your corrections.
=head2 How to contribute to the perlfaq
request so the main repository can pull your changes. The repository
is at:
- https://github.com/briandfoy/perlfaq
+ https://github.com/briandfoy/perlfaq
=head2 What will happen if you mail your Perl programming problems to the authors?
Tom Christiansen wrote the original perlfaq then expanded it with the
help of Nat Torkington. The perlfaq-workers maintain current document
-and the denizens of comp.lang.perl.misc regularly review and update the
+and the dezinens of comp.lang.perl.misc regularly review and update the
FAQ. Several people have contributed answers, corrections, and comments,
and the perlfaq notes those contributions wherever appropriate.
=head1 AUTHOR AND COPYRIGHT
-Copyright (c) 1997-2009 Tom Christiansen, Nathan Torkington, and
-other authors as noted. All rights reserved.
-
-Tom Christiansen wrote the original version of this document.
+Tom Christainsen wrote the original version of this document.
brian d foy C<< <bdfoy@cpan.org> >> wrote this version. See the
individual perlfaq documents for additional copyright information.
This document is available under the same terms as Perl itself. Code
examples in all the perlfaq documents are in the public domain. Use
-them as you see fit and at your own risk with no warranty from anyone.
+them as you see fit (and at your own risk with no warranty from anyone).
=head1 Table of Contents
=item *
-Does Perl have a Year 2000 problem? Is Perl Y2K compliant?
+Does Perl have a Year 2000 or 2038 problem? Is Perl Y2K compliant?
=item *
=item *
+How do I delete the last N lines from a file?
+
+=item *
+
How can I use Perl's C<-i> option from within a program?
=item *
=item *
-How can I comment out a large block of perl code?
+How can I comment out a large block of Perl code?
=item *
=back
+
=back
-=head1 REVISION
-
-Revision: $Revision$
-
-Date: $Date$
-
-See L<perlfaq> for source control details and availability.
-
=head1 AUTHOR AND COPYRIGHT
-Copyright (c) 1997-2009 Tom Christiansen, Nathan Torkington, and
+Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
other authors as noted. All rights reserved.
This documentation is free; you can redistribute it and/or modify it
see their FAQ ( http://www.faqs.org/faqs/alt-sources-intro/ ) for details.
If you're just looking for software, first use Google
-( http://www.google.com ), Google's USENET search interface
+( http://www.google.com ), Google's usenet search interface
( http://groups.google.com ), and CPAN Search ( http://search.cpan.org ).
This is faster and more productive than just posting a request.
a replicated worldwide repository of Perl software, see
the I<What is CPAN?> question earlier in this document.
-=head1 REVISION
-
-Revision: $Revision$
-
-Date: $Date$
-
-See L<perlfaq> for source control details and availability.
-
=head1 AUTHOR AND COPYRIGHT
-Copyright (c) 1997-2009 Tom Christiansen, Nathan Torkington, and
+Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
other authors as noted. All rights reserved.
This documentation is free; you can redistribute it and/or modify it
Perl programs are just plain text, so any editor will do.
-If you're on Unix, you already have an IDE--Unix itself. The Unix
+If you're on Unix, you already have an IDE--Unix itself. The UNIX
philosophy is the philosophy of several small tools that each do one
thing and do it well. It's like a carpenter's toolbox.
nvi ( http://www.bostic.com/vi/ , available from CPAN in src/misc/) is
yet another vi clone, unfortunately not available for Windows, but in
-Unix platforms you might be interested in trying it out, firstly because
+UNIX platforms you might be interested in trying it out, firstly because
strictly speaking it is not a vi clone, it is the real vi, or the new
incarnation of it, and secondly because you can embed Perl inside it
to use Perl as the scripting language. nvi is not alone in this,
research purposes), Cygwin is covered by the GNU General Public
License (but that shouldn't matter for Perl use). The Cygwin, MKS,
and U/WIN all contain (in addition to the shells) a comprehensive set
-of standard Unix toolkit utilities.
+of standard UNIX toolkit utilities.
If you're transferring text files between Unix and Windows using FTP
be sure to transfer them in ASCII mode so the ends of lines are
Perl2Exe ( http://www.indigostar.com/perl2exe.htm ) is a command line
program for converting perl scripts to executable files. It targets both
-Windows and Unix platforms.
+Windows and unix platforms.
=head2 How can I get C<#!perl> to work on [MS-DOS,NT,...]?
The C<ExtUtils::MakeMaker> module, better known simply as "MakeMaker",
turns a Perl script, typically called C<Makefile.PL>, into a Makefile.
-The Unix tool C<make> uses this file to manage dependencies and actions
+The unix tool C<make> uses this file to manage dependencies and actions
to process and install a Perl distribution.
-=head1 REVISION
-
-Revision: $Revision$
-
-Date: $Date$
-
-See L<perlfaq> for source control details and availability.
-
=head1 AUTHOR AND COPYRIGHT
-Copyright (c) 1997-2009 Tom Christiansen, Nathan Torkington, and
+Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
other authors as noted. All rights reserved.
This documentation is free; you can redistribute it and/or modify it
print $string + 44; # prints 688, certainly not octal!
This problem usually involves one of the Perl built-ins that has the
-same name a Unix command that uses octal numbers as arguments on the
+same name a unix command that uses octal numbers as arguments on the
command line. In this example, C<chmod> on the command line knows that
its first argument is octal because that's what it does:
(contributed by brian d foy)
-Perl itself never had a Y2K problem, although that never stopped people
+Perl itself never had a Y2K problem, although that nevers stopped people
from creating Y2K problems on their own. See the documentation for
C<localtime> for its proper use.
=head2 What is the difference between a list and an array?
-An array has a changeable length. A list does not. An array is
-something you can push or pop, while a list is a set of values. Some
-people make the distinction that a list is a value while an array is a
-variable. Subroutines are passed and return lists, you put things into
-list context, you initialize arrays with lists, and you C<foreach()>
-across a list. C<@> variables are arrays, anonymous arrays are
-arrays, arrays in scalar context behave like the number of elements in
-them, subroutines access their arguments through the array C<@_>, and
-C<push>/C<pop>/C<shift> only work on arrays.
+(contributed by brian d foy)
+
+A list is a fixed collection of scalars. An array is a variable that
+holds a variable collection of scalars. An array can supply its collection
+for list operations, so list operations also work on arrays:
+
+ # slices
+ ( 'dog', 'cat', 'bird' )[2,3];
+ @animals[2,3];
+
+ # iteration
+ foreach ( qw( dog cat bird ) ) { ... }
+ foreach ( @animals ) { ... }
+
+ my @three = grep { length == 3 } qw( dog cat bird );
+ my @three = grep { length == 3 } @animals;
+
+ # supply an argument list
+ wash_animals( qw( dog cat bird ) );
+ wash_animals( @animals );
+
+Array operations, which change the scalars, reaaranges them, or adds
+or subtracts some scalars, only work on arrays. These can't work on a
+list, which is fixed. Array operations include C<shift>, C<unshift>,
+C<push>, C<pop>, and C<splice>.
+
+An array can also change its length:
+
+ $#animals = 1; # truncate to two elements
+ $#animals = 10000; # pre-extend to 10,001 elements
+
+You can change an array element, but you can't change a list element:
+
+ $animals[0] = 'Rottweiler';
+ qw( dog cat bird )[0] = 'Rottweiler'; # syntax error!
+
+ foreach ( @animals ) {
+ s/^d/fr/; # works fine
+ }
+
+ foreach ( qw( dog cat bird ) ) {
+ s/^d/fr/; # Error! Modification of read only value!
+ }
+
+However, if the list element is itself a variable, it appears that you
+can change a list element. However, the list element is the variable, not
+the data. You're not changing the list element, but something the list
+element refers to. The list element itself doesn't change: it's still
+the same variable.
-As a side note, there's no such thing as a list in scalar context.
-When you say
+You also have to be careful about context. You can assign an array to
+a scalar to get the number of elements in the array. This only works
+for arrays, though:
+
+ my $count = @animals; # only works with arrays
+
+If you try to do the same thing with what you think is a list, you
+get a quite different result. Although it looks like you have a list
+on the righthand side, Perl actually sees a bunch of scalars separated
+by a comma:
- $scalar = (2, 5, 7, 9);
+ my $scalar = ( 'dog', 'cat', 'bird' ); # $scalar gets bird
-you're using the comma operator in scalar context, so it uses the scalar
-comma operator. There never was a list there at all! This causes the
-last value to be returned: 9.
+Since you're assigning to a scalar, the righthand side is in scalar
+context. The comma operator (yes, it's an operator!) in scalar
+context evaluates its lefthand side, throws away the result, and
+evaluates it's righthand side and returns the result. In effect,
+that list-lookalike assigns to C<$scalar> it's rightmost value. Many
+people mess this up becuase they choose a list-lookalike whose
+last element is also the count they expect:
+
+ my $scalar = ( 1, 2, 3 ); # $scalar gets 3, accidentally
=head2 What is the difference between $array[1] and @array[1]?
-The former is a scalar value; the latter an array slice, making
-it a list with one (scalar) value. You should use $ when you want a
-scalar value (most of the time) and @ when you want a list with one
-scalar value in it (very, very rarely; nearly never, in fact).
+(contributed by brian d foy)
+
+The difference is the sigil, that special character in front of the
+array name. The C<$> sigil means "exactly one item", while the C<@>
+sigil means "zero or more items". The C<$> gets you a single scalar,
+while the C<@> gets you a list.
-Sometimes it doesn't make a difference, but sometimes it does.
-For example, compare:
+The confusion arises because people incorrectly assume that the sigil
+denotes the variable type.
- $good[0] = `some program that outputs several lines`;
+The C<$array[1]> is a single-element access to the array. It's going
+to return the item in index 1 (or undef if there is no item there).
+If you intend to get exactly one element from the array, this is the
+form you should use.
-with
+The C<@array[1]> is an array slice, although it has only one index.
+You can pull out multiple elements simultaneously by specifying
+additional indices as a list, like C<@array[1,4,3,0]>.
- @bad[0] = `same program that outputs several lines`;
+Using a slice on the lefthand side of the assignment supplies list
+context to the righthand side. This can lead to unexpected results.
+For instance, if you want to read a single line from a filehandle,
+assigning to a scalar value is fine:
-The C<use warnings> pragma and the B<-w> flag will warn you about these
-matters.
+ $array[1] = <STDIN>;
+
+However, in list context, the line input operator returns all of the
+lines as a list. The first line goes into C<@array[1]> and the rest
+of the lines mysteriously disappear:
+
+ @array[1] = <STDIN>; # most likely not what you want
+
+Either the C<use warnings> pragma or the B<-w> flag will warn you when
+you use an array slice with a single index.
=head2 How can I remove duplicate elements from a list or array?
See L<http://search.cpan.org/dist/PGPLOT> for the code.
-=head1 REVISION
-
-Revision: $Revision$
-
-Date: $Date$
-
-See L<perlfaq> for source control details and availability.
-
=head1 AUTHOR AND COPYRIGHT
-Copyright (c) 1997-2009 Tom Christiansen, Nathan Torkington, and
+Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
other authors as noted. All rights reserved.
This documentation is free; you can redistribute it and/or modify it
=head2 How do I count the number of lines in a file?
X<file, counting lines> X<lines> X<line>
-One fairly efficient way is to count newlines in the file. The
-following program uses a feature of tr///, as documented in L<perlop>.
-If your text file doesn't end with a newline, then it's not really a
-proper text file, so this may report one fewer line than you expect.
-
- $lines = 0;
- open(FILE, $filename) or die "Can't open `$filename': $!";
- while (sysread FILE, $buffer, 4096) {
- $lines += ($buffer =~ tr/\n//);
+(contributed by brian d foy)
+
+Conceptually, the easiest way to count the lines in a file is to
+simply read them and count them:
+
+ my $count = 0;
+ while( <$fh> ) { $count++; }
+
+You don't really have to count them yourself, though, since Perl
+already does that with the C<$.> variable, which is the current line
+number from the last filehandle read:
+
+ 1 while( <$fh> );
+ my $count = $.;
+
+If you want to use C<$.>, you can reduce it to a simple one-liner,
+like one of these:
+
+ % perl -lne '} print $.; {' file
+
+ % perl -lne 'END { print $. }' file
+
+Those can be rather inefficient though. If they aren't fast enough for
+you, you might just read chunks of data and count the number of
+newlines:
+
+ my $lines = 0;
+ open my($fh), '<:raw', $filename or die "Can't open $filename: $!";
+ while( sysread $fh, $buffer, 4096 ) {
+ $lines += ( $buffer =~ tr/\n// );
}
close FILE;
-This assumes no funny games with newline translations.
+However, that doesn't work if the line ending isn't a newline. You
+might change that C<tr///> to a C<s///> so you can count the number of
+times the input record separator, C<$/>, shows up:
+
+ my $lines = 0;
+ open my($fh), '<:raw', $filename or die "Can't open $filename: $!";
+ while( sysread $fh, $buffer, 4096 ) {
+ $lines += ( $buffer =~ s|$/||g; );
+ }
+ close FILE;
+
+If you don't mind shelling out, the C<wc> command is usually the
+fastest, even with the extra interprocess overhead. Ensure that you
+have an untainted filename though:
+
+ #!perl -T
+
+ $ENV{PATH} = undef;
+
+ my $lines;
+ if( $filename =~ /^([0-9a-z_.]+)\z/ ) {
+ $lines = `/usr/bin/wc -l $1`
+ chomp $lines;
+ }
=head2 How do I delete the last N lines from a file?
X<lines> X<file>
(contributed by brian d foy)
-If you have an empty directory, you can use Perl's built-in C<rmdir>. If
-the directory is not empty (so, no files or subdirectories), you either
-have to empty it yourself (a lot of work) or use a module to help you.
+If you have an empty directory, you can use Perl's built-in C<rmdir>.
+If the directory is not empty (so, no files or subdirectories), you
+either have to empty it yourself (a lot of work) or use a module to
+help you.
-The C<File::Path> module, which comes with Perl, has a C<rmtree> which
-can take care of all of the hard work for you:
+The C<File::Path> module, which comes with Perl, has a C<remove_tree>
+which can take care of all of the hard work for you:
- use File::Path qw(rmtree);
+ use File::Path qw(remove_tree);
- rmtree( \@directories, 0, 0 );
+ remove_tree( @directories );
-The first argument to C<rmtree> is either a string representing a directory path
-or an array reference. The second argument controls progress messages, and the
-third argument controls the handling of files you don't have permissions to
-delete. See the C<File::Path> module for the details.
+The C<File::Path> module also has a legacy interface to the older
+C<rmtree> subroutine.
=head2 How do I copy an entire directory?
To do the equivalent of C<cp -R> (i.e. copy an entire directory tree
recursively) in portable Perl, you'll either need to write something yourself
or find a good CPAN module such as L<File::Copy::Recursive>.
-=head1 REVISION
-
-Revision: $Revision$
-
-Date: $Date$
-
-See L<perlfaq> for source control details and availability.
=head1 AUTHOR AND COPYRIGHT
-Copyright (c) 1997-2009 Tom Christiansen, Nathan Torkington, and
+Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
other authors as noted. All rights reserved.
This documentation is free; you can redistribute it and/or modify it
warn $@;
}
-=head1 REVISION
-
-Revision: $Revision$
-
-Date: $Date$
-
-See L<perlfaq> for source control details and availability.
-
=head1 AUTHOR AND COPYRIGHT
-Copyright (c) 1997-2009 Tom Christiansen, Nathan Torkington, and
+Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
other authors as noted. All rights reserved.
This documentation is free; you can redistribute it and/or modify it
Calling a subroutine as C<&foo> with no trailing parentheses ignores
the prototype of C<foo> and passes it the current value of the argument
list, C<@_>. Here's an example; the C<bar> subroutine calls C<&foo>,
-which prints its argument list:
+which prints what its arguments list:
sub bar { &foo }
your PATH, which might also mean that the location of perl is not
where you expect it so you need to adjust your shebang line.
-=head1 REVISION
-
-Revision: $Revision$
-
-Date: $Date$
-
-See L<perlfaq> for source control details and availability.
-
=head1 AUTHOR AND COPYRIGHT
-Copyright (c) 1997-2009 Tom Christiansen, Nathan Torkington, and
+Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
other authors as noted. All rights reserved.
This documentation is free; you can redistribute it and/or modify it
=head2 How do I find out which operating system I'm running under?
-The C<$^O> variable (C<$OSNAME> if you use C<English>) contains an indication of
-the name of the operating system (not its release number) that your perl
-binary was built for.
+The C<$^O> variable (C<$OSNAME> if you use C<English>) contains an
+indication of the name of the operating system (not its release
+number) that your perl binary was built for.
=head2 How come exec() doesn't return?
X<exec> X<system> X<fork> X<open> X<pipe>
However, using the code requires that you have a working C compiler
and can use it to build and install a CPAN module. Here's a solution
-using the standard C<POSIX> module, which is already on your system
+using the standard C<POSIX> module, which is already on your systems
(assuming your system supports POSIX).
use HotKey;
=back
-While trying to read from his caller-id box, the notorious Jamie Zawinski
-C<< <jwz@netscape.com> >>, after much gnashing of teeth and fighting with C<sysread>,
-C<sysopen>, POSIX's C<tcgetattr> business, and various other functions that
-go bump in the night, finally came up with this:
+While trying to read from his caller-id box, the notorious Jamie
+Zawinski C<< <jwz@netscape.com> >>, after much gnashing of teeth and
+fighting with C<sysread>, C<sysopen>, POSIX's C<tcgetattr> business,
+and various other functions that go bump in the night, finally came up
+with this:
sub open_modem {
use IPC::Open2;
and many of the techniques are in L<perlipc>.
Several CPAN modules may be able to help, including C<IPC::Open2> or
-C<IPC::Open3>, C<IPC::Run>, C<Parallel::Jobs>, C<Parallel::ForkManager>, C<POE>,
-C<Proc::Background>, and C<Win32::Process>. There are many other modules you
-might use, so check those namespaces for other options too.
+C<IPC::Open3>, C<IPC::Run>, C<Parallel::Jobs>,
+C<Parallel::ForkManager>, C<POE>, C<Proc::Background>, and
+C<Win32::Process>. There are many other modules you might use, so
+check those namespaces for other options too.
-If you are on a Unix-like system, you might be able to get away with a
+If you are on a unix-like system, you might be able to get away with a
system call where you put an C<&> on the end of the command:
system("cmd &")
However, if all you want to do is change your time zone, you can
probably get away with setting an environment variable:
- $ENV{TZ} = "MST7MDT"; # Unixish
+ $ENV{TZ} = "MST7MDT"; # unixish
$ENV{'SYS$TIMEZONE_DIFFERENTIAL'}="-5" # vms
system "trn comp.lang.perl.misc";
use sigtrap qw(die normal-signals);
-Perl's exception-handling mechanism is its C<eval()> operator. You can
-use C<eval()> as C<setjmp> and C<die()> as C<longjmp>. For details of this, see
-the section on signals, especially the time-out handler for a blocking
-C<flock()> in L<perlipc/"Signals"> or the section on "Signals" in
-the Camel Book.
+Perl's exception-handling mechanism is its C<eval()> operator. You
+can use C<eval()> as C<setjmp> and C<die()> as C<longjmp>. For
+details of this, see the section on signals, especially the time-out
+handler for a blocking C<flock()> in L<perlipc/"Signals"> or the
+section on "Signals" in the Camel Book.
If exception handling is all you're interested in, try the
C<exceptions.pl> library (part of the standard perl distribution).
=head2 How can I open a pipe both to and from a command?
-The C<IPC::Open2> module (part of the standard perl distribution) is an
-easy-to-use approach that internally uses C<pipe()>, C<fork()>, and C<exec()>
-to do the job. Make sure you read the deadlock warnings in its documentation,
-though (see L<IPC::Open2>). See
+The C<IPC::Open2> module (part of the standard perl distribution) is
+an easy-to-use approach that internally uses C<pipe()>, C<fork()>, and
+C<exec()> to do the job. Make sure you read the deadlock warnings in
+its documentation, though (see L<IPC::Open2>). See
L<perlipc/"Bidirectional Communication with Another Process"> and
L<perlipc/"Bidirectional Communication with Yourself">
=head2 Why can't my script read from STDIN after I gave it EOF (^D on Unix, ^Z on MS-DOS)?
This happens only if your perl is compiled to use stdio instead of
-perlio, which is the default. Some (maybe all?) stdios set error and
+perlio, which is the default. Some (maybe all?) stdio's set error and
eof flags that you may need to clear. The C<POSIX> module defines
C<clearerr()> that you can use. That is the technically correct way to
do it. Here are some less reliable workarounds:
=head2 Can I use perl to run a telnet or ftp session?
-Try the C<Net::FTP>, C<TCP::Client>, and C<Net::Telnet> modules (available from
-CPAN). http://www.cpan.org/scripts/netstuff/telnet.emul.shar
-will also help for emulating the telnet protocol, but C<Net::Telnet> is
-quite probably easier to use.
+Try the C<Net::FTP>, C<TCP::Client>, and C<Net::Telnet> modules
+(available from CPAN).
+http://www.cpan.org/scripts/netstuff/telnet.emul.shar will also help
+for emulating the telnet protocol, but C<Net::Telnet> is quite
+probably easier to use.
If all you want to do is pretend to be telnet but don't need
the initial telnet handshaking, then the standard dual-process
(contributed by brian d foy)
This is a difficult question to answer, and the best answer is
-only a guess. What do you really want to know? If you merely
-want to know if one of your filehandles is connected to a terminal,
-you can try the C<-t> file test:
+only a guess.
+
+What do you really want to know? If you merely want to know if one of
+your filehandles is connected to a terminal, you can try the C<-t>
+file test:
if( -t STDOUT ) {
print "I'm connected to a terminal!\n";
available drivers on CPAN: http://www.cpan.org/modules/by-module/DBD/ .
You can read more about DBI on http://dbi.perl.org .
-Other modules provide more specific access: C<Win32::ODBC>, C<Alzabo>, C<iodbc>,
-and others found on CPAN Search: http://search.cpan.org .
+Other modules provide more specific access: C<Win32::ODBC>, C<Alzabo>,
+C<iodbc>, and others found on CPAN Search: http://search.cpan.org .
=head2 How do I make a system() exit on control-C?
perl Makefile.PL INSTALL_BASE=/mydir/perl
-You can set this in your C<CPAN.pm> configuration so modules automatically install
-in your private library directory when you use the CPAN.pm shell:
+You can set this in your C<CPAN.pm> configuration so modules
+automatically install in your private library directory when you use
+the CPAN.pm shell:
% cpan
cpan> o conf makepl_arg INSTALL_BASE=/mydir/perl
You can configure C<CPAN.pm> to automatically use this option too:
% cpan
- cpan> o conf mbuild_arg --install_base /mydir/perl
+ cpan> o conf mbuild_arg "--install_base /mydir/perl"
cpan> o conf commit
INSTALL_BASE tells these tools to put your modules into
constants. Sometimes it is built using C<h2ph> when Perl is installed,
but other times it is not. Modern programs C<use Socket;> instead.
-=head1 REVISION
-
-Revision: $Revision$
-
-Date: $Date$
-
-See L<perlfaq> for source control details and availability.
-
=head1 AUTHOR AND COPYRIGHT
-Copyright (c) 1997-2009 Tom Christiansen, Nathan Torkington, and
+Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
other authors as noted. All rights reserved.
This documentation is free; you can redistribute it and/or modify it
Use one of the RPC modules you can find on CPAN (
http://search.cpan.org/search?query=RPC&mode=all ).
-=head1 REVISION
-
-Revision: $Revision$
-
-Date: $Date$
-
-See L<perlfaq> for source control details and availability.
-
=head1 AUTHOR AND COPYRIGHT
-Copyright (c) 1997-2009 Tom Christiansen, Nathan Torkington, and
+Copyright (c) 1997-2010 Tom Christiansen, Nathan Torkington, and
other authors as noted. All rights reserved.
This documentation is free; you can redistribute it and/or modify it