diff options
author | Larry Wall <lwall@netlabs.com> | 1995-03-12 22:32:14 -0800 |
---|---|---|
committer | Larry Wall <lwall@netlabs.com> | 1995-03-12 22:32:14 -0800 |
commit | 748a93069b3d16374a9859d1456065dd3ae11394 (patch) | |
tree | 308ca14de9933a313dceacce8be77db67d9368c7 /pod/perltrap.pod | |
parent | fec02dd38faf8f83471b031857d89cb76fea1ca0 (diff) | |
download | perl-748a93069b3d16374a9859d1456065dd3ae11394.tar.gz |
Perl 5.001perl-5.001
[See the Changes file for a list of changes]
Diffstat (limited to 'pod/perltrap.pod')
-rw-r--r-- | pod/perltrap.pod | 21 |
1 files changed, 19 insertions, 2 deletions
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<perlop>. =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 <FH> 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 (<FH>) { } + while ($_ = <FH>) { }.. + <FH>; # 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 * |