in reply to Question of example from Camel Book
print needs to evaluate the function to see what is
returned to be printed
Not this fragment is useful, but you can see why
one would want the function to return a value first.
use strict; use warnings; sub yaya { return " ha \n"; } my $foo = "bar"; print ($foo, yaya);
Update:Ok. Took a look at
that section of the Camel.
It's all in the precedence of arguments and functions
can be arguments. parens can modify this, but
you may need a unary plus to avoid some mistakes
It might be worth reading that section a few more times.
|
|---|