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";
|file: /Techref/language/perl/expression.htm, 1KB, , updated: 2009/5/14 14:40, local time: 2018/9/25 07:08,
|©2018 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://www.piclist.com/techref/language/perl/expression.htm"> PERL Expressions</A>
|Did you find what you needed?|
PICList 2018 contributors:
o List host: MIT, Site host massmind.org, Top posters @20180925 RussellMc, Van Horn, David, Sean Breheny, David C Brown, Bob Blick, Isaac M. Bavaresco, Neil, Denny Esterline, Harold Hallikainen, John Gardner,
* Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
Welcome to www.piclist.com!