Here's a nice simple example of when you might need to use it:
$ perl -e 'print (2+3)/5' 5
How on earth does that print 5? Because it evaluates as "print the result of 2 + 3, then divide print's return value (which is 1 if print worked) by 5, and then do nothing with the result". This is obvious if you stick another print in there:
$ perl -e 'print print (2+3)/5' 50.2
which is parsed as:
print((print(2+3))/5)
In reply to Re^4: return +0
by DrHyde
in thread return +0
by arunvelusamy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |