summaryrefslogtreecommitdiff
path: root/pod/perlport.pod
diff options
context:
space:
mode:
authorPhilip Newton <pne@cpan.org>2002-02-16 11:05:05 +0100
committerAbhijit Menon-Sen <ams@wiw.org>2002-02-16 13:45:28 +0000
commitfe8296896b14aa93f1136ce57f05259d511ec956 (patch)
tree6ed26aa263b9583fef089c1c5ac7f16ab2ed9ad8 /pod/perlport.pod
parentf1f9f91ecb7884b8731faafb0893a53dbe12d96b (diff)
downloadperl-fe8296896b14aa93f1136ce57f05259d511ec956.tar.gz
[DOC PATCH perlport.pod] Typo fix and three-arg open
Message-Id: <558s6u4djrbk46q44fvqs5mfviq9311lj1@4ax.com> (Applied by hand.) p4raw-link: @4 on //depot/thrperl: 11343788cbaaede18e3146b5219d2fbdaeaf516e p4raw-id: //depot/perl@14718
Diffstat (limited to 'pod/perlport.pod')
-rw-r--r--pod/perlport.pod11
1 files changed, 7 insertions, 4 deletions
diff --git a/pod/perlport.pod b/pod/perlport.pod
index df304154c1..0fa8d2675f 100644
--- a/pod/perlport.pod
+++ b/pod/perlport.pod
@@ -332,20 +332,23 @@ first 8 characters.
Whitespace in filenames is tolerated on most systems, but not all,
and even on systems where it might be tolerated, some utilities
-might becoem confused by such whitespace.
+might become confused by such whitespace.
Many systems (DOS, VMS) cannot have more than one C<.> in their filenames.
Don't assume C<< > >> won't be the first character of a filename.
-Always use C<< < >> explicitly to open a file for reading,
-unless you want the user to be able to specify a pipe open.
+Always use C<< < >> explicitly to open a file for reading, or even
+better, use the three-arg version of open, unless you want the user to
+be able to specify a pipe open.
- open(FILE, "< $existing_file") or die $!;
+ open(FILE, '<', $existing_file) or die $!;
If filenames might use strange characters, it is safest to open it
with C<sysopen> instead of C<open>. C<open> is magic and can
translate characters like C<< > >>, C<< < >>, and C<|>, which may
be the wrong thing to do. (Sometimes, though, it's the right thing.)
+Three-arg open can also help protect against this translation in cases
+where it is undesirable.
Don't use C<:> as a part of a filename since many systems use that for
their own semantics (MacOS Classic for separating pathname components,