summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorbrian d foy <brian.d.foy@gmail.com>2010-08-21 12:03:46 -0500
committerbrian d foy <brian.d.foy@gmail.com>2010-09-14 12:19:03 -0500
commit84adb7243d1e8c527659f32895b8cc8e6ea27401 (patch)
tree7790bf8c99d151cd3410a77adb3d567b07cfb884 /pod
parent820b2690a908738e3f3ed2d0610107e771c57cf8 (diff)
downloadperl-84adb7243d1e8c527659f32895b8cc8e6ea27401.tar.gz
Fix trailing whitespace
Diffstat (limited to 'pod')
-rw-r--r--pod/perlfaq4.pod2
-rw-r--r--pod/perlfaq5.pod18
-rw-r--r--pod/perlfaq8.pod12
-rw-r--r--pod/perlfaq9.pod6
4 files changed, 19 insertions, 19 deletions
diff --git a/pod/perlfaq4.pod b/pod/perlfaq4.pod
index f8aa1623ef..80b36c9b71 100644
--- a/pod/perlfaq4.pod
+++ b/pod/perlfaq4.pod
@@ -1577,7 +1577,7 @@ reallocate less memory, or quickly insert elements in the middle of
the chain.
Steve Lembark goes through the details in his YAPC::NA 2009 talk "Perly
-Linked Lists" ( http://www.slideshare.net/lembark/perly-linked-lists ),
+Linked Lists" ( http://www.slideshare.net/lembark/perly-linked-lists ),
although you can just use his C<LinkedList::Single> module.
=head2 How do I handle circular lists?
diff --git a/pod/perlfaq5.pod b/pod/perlfaq5.pod
index 8ae30869da..4fcf33772b 100644
--- a/pod/perlfaq5.pod
+++ b/pod/perlfaq5.pod
@@ -646,21 +646,21 @@ X<write, into a string>
(contributed by brian d foy)
-If you want to C<write> into a string, you just have to <open> a
+If you want to C<write> into a string, you just have to <open> a
filehandle to a string, which Perl has been able to do since Perl 5.6:
open FH, '>', \my $string;
write( FH );
-
+
Since you want to be a good programmer, you probably want to use a lexical
filehandle, even though formats are designed to work with bareword filehandles
-since the default format names take the filehandle name. However, you can
+since the default format names take the filehandle name. However, you can
control this with some Perl special per-filehandle variables: C<$^>, which
names the top-of-page format, and C<$~> which shows the line format. You have
to change the default filehandle to set these variables:
open my($fh), '>', \my $string;
-
+
{ # set per-filehandle variables
my $old_fh = select( $fh );
$~ = 'ANIMAL';
@@ -671,24 +671,24 @@ to change the default filehandle to set these variables:
format ANIMAL_TOP =
ID Type Name
.
-
+
format ANIMAL =
@## @<<< @<<<<<<<<<<<<<<
$id, $type, $name
.
Although write can work with lexical or package variables, whatever variables
-you use have to scope in the format. That most likely means you'll want to
+you use have to scope in the format. That most likely means you'll want to
localize some package variables:
{
local( $id, $type, $name ) = qw( 12 cat Buster );
write( $fh );
}
-
+
print $string;
-There are also some tricks that you can play with C<formline> and the
+There are also some tricks that you can play with C<formline> and the
accumulator variable C<$^A>, but you lose a lot of the value of formats
since C<formline> won't handle paging and so on. You end up reimplementing
formats when you use them.
@@ -1177,7 +1177,7 @@ close the file at block exit. If the file is already open, just use this:
my $var = do { local $/; <$fh> };
-You can do that one better by using a localized C<@ARGV> so you can
+You can do that one better by using a localized C<@ARGV> so you can
eliminate the C<open>:
my $var = do { local( @ARGV, $/ ) = $file; <> };
diff --git a/pod/perlfaq8.pod b/pod/perlfaq8.pod
index 08a5b038b4..99af392875 100644
--- a/pod/perlfaq8.pod
+++ b/pod/perlfaq8.pod
@@ -545,7 +545,7 @@ 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 I<Programming Perl>.
-If exception handling is all you're interested in, use one of the
+If exception handling is all you're interested in, use one of the
many CPAN modules that handle exceptions, such as C<Try::Tiny>.
If you want the C<atexit()> syntax (and an C<rmexit()> as well), try the
@@ -1263,7 +1263,7 @@ See the entry for C<use> in L<perlfunc> for more details.
=head2 How do I keep my own module/library directory?
-When you build modules, tell Perl where to install the modules.
+When you build modules, tell Perl where to install the modules.
If you want to install modules for your own use, the easiest way might
be C<local::lib>, which you can download from CPAN. It sets various
@@ -1349,9 +1349,9 @@ directory of the currently running script and puts it in C<$Bin>, which
you can then use to construct the right library path:
use FindBin qw($Bin);
-
+
You can also use C<local::lib> to do much of the same thing. Install
-modules using C<local::lib>'s settings then use the module in your
+modules using C<local::lib>'s settings then use the module in your
program:
use local::lib; # sets up a local lib at ~/perl5
@@ -1386,9 +1386,9 @@ environment variables, run-time switches, and in-code statements:
=item the C<local::lib> module:
use local::lib;
-
+
use local::lib "~/myown_perllib";
-
+
=back
The last is particularly useful because it knows about machine
diff --git a/pod/perlfaq9.pod b/pod/perlfaq9.pod
index ab7157b5b2..1c62cef22c 100644
--- a/pod/perlfaq9.pod
+++ b/pod/perlfaq9.pod
@@ -663,10 +663,10 @@ can work with FTP just like it can with many other protocols. C<LWP::Simple>
makes it quite easy to fetch a file:
use LWP::Simple;
-
+
my $data = get( 'ftp://some.ftp.site/some/file.txt' );
-
-If you want more direct or low-level control of the FTP process, you can use
+
+If you want more direct or low-level control of the FTP process, you can use
the C<Net::FTP> module (in the Standard Library since Perl 5.8). It's
documentation has examples showing you just how to do that.