in reply to Re: Unusual Behavior in Interpolative Context
in thread Unusual Behavior in Interpolative Context

Thanks for explaining to me that method calls are not resolved in interpolative context.

I came across an interesting tidbit in Chapter 8 of the Camel book that is related to your workaround: It said

Avoid printf if print will work. Quite apart from the extra overhead of printf, some implementations have field length limitations that print gets around.
So based on what Larry Wall says even if your way of forcing interpolation is ugly it is still preferable.
  • Comment on Re: Re: Unusual Behavior in Interpolative Context

Replies are listed 'Best First'.
Re: Re: Re: Unusual Behavior in Interpolative Context
by chromatic (Archbishop) on Feb 04, 2001 at 11:01 UTC
    Also remember that print takes a list of arguments. I don't find it too much of a hassle to say something like:

    print "Result: ", $obj->foo(), "\n";

    It's a little more efficient, too, but if that's the last thing you need to optimize you're way ahead of the game.