From 748a93069b3d16374a9859d1456065dd3ae11394 Mon Sep 17 00:00:00 2001 From: Larry Wall Date: Sun, 12 Mar 1995 22:32:14 -0800 Subject: Perl 5.001 [See the Changes file for a list of changes] --- pod/perltrap.pod | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'pod/perltrap.pod') diff --git a/pod/perltrap.pod b/pod/perltrap.pod index 51dac4770f..fa68a753c2 100644 --- a/pod/perltrap.pod +++ b/pod/perltrap.pod @@ -292,12 +292,22 @@ unary ones.) See L. =item * -People have a hard type remembering that some functions +People have a hard time remembering that some functions default to $_, or @ARGV, or whatever, but that others which you might expect to do not. =item * +The construct is not the name of the filehandle, it is a readline +operation on that handle. The data read is only assigned to $_ if the +file read is the sole condition in a while loop: + + while () { } + while ($_ = ) { }.. + ; # data discarded! + +=item * + Remember not to use "C<=>" when you need "C<=~>"; these two constructs are quite different: @@ -332,12 +342,13 @@ C<@> now always interpolates an array in double-quotish strings. Some programs may now need to use backslash to protect any C<@> that shouldn't interpolate. =item * + Barewords that used to look like strings to Perl will now look like subroutine calls if a subroutine by that name is defined before the compiler sees them. For example: sub SeeYa { die "Hasta la vista, baby!" } - $SIG{QUIT} = SeeYa; + $SIG{'QUIT'} = SeeYa; In Perl 4, that set the signal handler; in Perl 5, it actually calls the function! You may use the B<-w> switch to find such places. @@ -442,6 +453,12 @@ since this capability may be onerous for some modules to implement. =item * +The construct "this is $$x" used to interpolate the pid at that +point, but now tries to dereference $x. C<$$> by itself still +works fine, however. + +=item * + Some error messages will be different. =item * -- cgit v1.2.1