Common:
http://www.perldoc.com/perl5.6/pod/perlop.html
-
~
-
ones complement
-
+
-
Add two numbers together (if you are lucky). Other than that, it has no effect
whatsoever, even on strings. ( use .= to concatonate ). However, It
is useful syntactically for separating a function name from a parenthesized
expression that would otherwise be interpreted as the complete list of function
arguments.
print ($foo & 255) + 1, "hello";
prints the lower 8 bits of $foo and does not add 1 or print "hello"
because the paran around $foo & 255 make print stop working at the ")"
The 1 and "hello" are evaluated as seperate statements.
print +($foo & 255) + 1, "hello";
prints "9hello"
See
http://www.perldoc.com/perl5.6/pod/perlop.html#Terms_and_List_Operators_Leftwa
-
\
-
Creates a reference to whatever follows it. See the perlref manpage. Do not
confuse this behavior with the behavior of backslash within a string, although
both forms do convey the notion of protecting the next thing from interpretation.
See
http://www.perldoc.com/perl5.6/pod/perlref.html
See also:
Comments:
file: /Techref/language/perl/expression.htm,
1KB, , updated: 2009年5月14日 14:40, local time: 2025年9月4日 21:22,
©2025 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Questions?<A HREF="http://techref.massmind.org/techref/language/perl/expression.htm"> PERL Expressions</A>
Did you find what you needed?
Welcome to massmind.org!
Welcome to techref.massmind.org!
.