develooper Front page | perl.perl5.porters | Postings from November 1999

[ID 19991118.007] Out-of-date perltrap entry

M.J.T. Guy
November 18, 1999 10:51
[ID 19991118.007] Out-of-date perltrap entry
Message ID:
The following entry in perltrap.pod is out of date in 5.005_62.
I'm not sure what the correct replacement is; it gives an error
up to 5.004_05 and is silent for 5.005_XX.

=item * Discontinuance

In Perl 4 (and versions of Perl 5 before 5.004), C<'\r'> characters in
Perl code were silently allowed, although they could cause (mysterious!)
failures in certain constructs, particularly here documents.  Now,
C<'\r'> characters cause an immediate fatal error.  (Note: In this
example, the notation B<\015> represents the incorrect line
ending. Depending upon your text viewer, it will look different.)

    print "foo";\015
    print "bar";

    # perl4     prints: foobar
    # perl5.003 prints: foobar
    # perl5.004 dies: Illegal character \015 (carriage return)

Mike Guy Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About