Think about Loose Coupling | |
PerlMonks |
Re^4: return +0by DrHyde (Prior) |
on Nov 27, 2007 at 10:36 UTC ( [id://653187]=note: print w/replies, xml ) | Need Help?? |
Here's a nice simple example of when you might need to use it:
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:
which is parsed as: print((print(2+3))/5)
In Section
Seekers of Perl Wisdom
|
|