summaryrefslogtreecommitdiff
path: root/pod/perlfunc.pod
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-02-07 09:30:47 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-02-07 09:30:47 +0000
commit62c18ce2c158fdc3401f5009417ddcfd1effff4a (patch)
treed2a8ffb909a7e8eee3ed9b0b8d9101e612b93589 /pod/perlfunc.pod
parentc8984b0bd19897e6e30588055ac0338326f20a34 (diff)
downloadperl-62c18ce2c158fdc3401f5009417ddcfd1effff4a.tar.gz
properly prototype check parenthesized unary ops (e.g. defined(&a,&b))
p4raw-id: //depot/perl@2817
Diffstat (limited to 'pod/perlfunc.pod')
-rw-r--r--pod/perlfunc.pod17
1 files changed, 17 insertions, 0 deletions
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index ef27b8b44a..3b5c5dd6d4 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -3069,6 +3069,23 @@ needed. If you really wanted to do so, however, you could use
the construction C<@{[ (some expression) ]}>, but usually a simple
C<(some expression)> suffices.
+Though C<scalar> can be considered in general to be a unary operator,
+EXPR is also allowed to be a parenthesized list. The list in fact
+behaves as a scalar comma expression, evaluating all but the last
+element in void context and returning the final element evaluated in
+a scalar context.
+
+The following single statement:
+
+ print uc(scalar(&foo,$bar)),$baz;
+
+is the moral equivalent of these two:
+
+ &foo;
+ print(uc($bar),$baz);
+
+See L<perlop> for more details on unary operators and the comma operator.
+
=item seek FILEHANDLE,POSITION,WHENCE
Sets FILEHANDLE's position, just like the C<fseek()> call of C<stdio()>.