Perl is expecting a filehandle, an indirect filehandle may be used
instead. An indirect filehandle is just a scalar variable that contains
a filehandle. Functions like C<print>, C<open>, C<seek>, or
-the C<E<lt>FHE<gt>> diamond operator will accept either a read filehandle
+the C<< <FH> >> diamond operator will accept either a read filehandle
or a scalar variable containing one:
($ifh, $ofh, $efh) = (*STDIN, *STDOUT, *STDERR);
real operator, not just a function with a comma-less argument. Assuming
you've been storing typeglobs in your structure as we did above, you
can use the built-in function named C<readline> to reads a record just
-as C<E<lt>E<gt>> does. Given the initialization shown above for @fd, this
+as C<< <> >> does. Given the initialization shown above for @fd, this
would work, but only because readline() require a typeglob. It doesn't
work with objects or strings, which might be a bug we haven't fixed yet.
=head2 How can I translate tildes (~) in a filename?
-Use the E<lt>E<gt> (glob()) operator, documented in L<perlfunc>. This
+Use the <> (glob()) operator, documented in L<perlfunc>. This
requires that you have a shell installed that groks tildes, meaning
csh or tcsh or (some versions of) ksh, and thus may have portability
problems. The Glob::KGlob module (available from CPAN) gives more
open(FH, "+< /path/name"); # open for update
-Using "E<gt>" always clobbers or creates. Using "E<lt>" never does
+Using ">" always clobbers or creates. Using "<" never does
either. The "+" doesn't change this.
Here are examples of many kinds of file opens. Those using sysopen()
successful create or unlink the same file! Therefore O_EXCL
isn't so exclusive as you might wish.
-See also the new L<perlopentut> if you have it (new for 5.006).
+See also the new L<perlopentut> if you have it (new for 5.6).
-=head2 Why do I sometimes get an "Argument list too long" when I use E<lt>*E<gt>?
+=head2 Why do I sometimes get an "Argument list too long" when I use <*>?
-The C<E<lt>E<gt>> operator performs a globbing operation (see above).
-By default glob() forks csh(1) to do the actual glob expansion, but
+The C<< <> >> operator performs a globbing operation (see above).
+In Perl versions earlier than v5.6.0, the internal glob() operator forks
+csh(1) to do the actual glob expansion, but
csh can't handle more than 127 items and so gives the error message
C<Argument list too long>. People who installed tcsh as csh won't
have this problem, but their users may be surprised by it.
-To get around this, either do the glob yourself with readdir() and
-patterns, or use a module like Glob::KGlob, one that doesn't use the
-shell to do globbing. This is expected to be fixed soon.
+To get around this, either upgrade to Perl v5.6.0 or later, do the glob
+yourself with readdir() and patterns, or use a module like Glob::KGlob,
+one that doesn't use the shell to do globbing.
=head2 Is there a leak/bug in glob()?
context, you may cause a leak and/or unpredictable behavior. It's
best therefore to use glob() only in list context.
-=head2 How can I open a file with a leading "E<gt>" or trailing blanks?
+=head2 How can I open a file with a leading ">" or trailing blanks?
Normally perl ignores trailing blanks in filenames, and interprets
certain leading characters (or a trailing "|") to mean something
or die "can't open $badpath: $!";
For more information, see also the new L<perlopentut> if you have it
-(new for 5.006).
+(new for 5.6).
=head2 How can I reliably rename a file?
your getting your job done.)
For more information on file locking, see also L<perlopentut/"File
-Locking"> if you have it (new for 5.006).
+Locking"> if you have it (new for 5.6).
=back
@lines = `cat $file`;
-This tiny but expedient solution is neat, clean, and portable to all
-systems that you've bothered to install decent tools on, even if you are
-a Prisoner of Bill. For those die-hards PoBs who've paid their billtax
-and refuse to use the toolbox, or who like writing complicated code for
-job security, you can of course read the file manually.
+This tiny but expedient solution is neat, clean, and portable to
+all systems on which decent tools have been installed. For those
+who prefer not to use the toolbox, you can of course read the file
+manually, although this makes for more complicated code.
{
local(*INPUT, $/);
$fd = $ENV{MHCONTEXTFD};
open(MHCONTEXT, "<&=$fd"); # like fdopen(3S)
-Note that "E<lt>&STDIN" makes a copy, but "E<lt>&=STDIN" make
+Note that "<&STDIN" makes a copy, but "<&=STDIN" make
an alias. That means if you close an aliased handle, all
aliases become inaccessible. This is not true with
a copied one.
covered under Perl's Artistic License. For separate distributions of
all or part of this FAQ outside of that, see L<perlfaq>.
-Irrespective of its distribution, all code examples here are public
+Irrespective of its distribution, all code examples here are in the public
domain. You are permitted and encouraged to use this code and any
derivatives thereof in your own programs for fun or for profit as you
see fit. A simple comment in the code giving credit to the FAQ would