Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to assign bit shift to a variable? 1

Status
Not open for further replies.

whn

Programmer
Oct 14, 2007
265
US
I know this line works:
Code:
print "OK!! Child($$, $pid) $res ended with ", $? >> 8; print "\n";

But how do I assign the line above into a variable? e.g.
Code:
$logMsg .= "OK!! Child($$, $pid) $res ended with ", $? >> 8;
$logMsg .= "\n";

While compiling it, I got this:
Code:
Useless use of right bitshift (>>) in void context at...

How to make it work? Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top