ColtsFoot has asked for the wisdom of the Perl Monks concerning the following question:
This however results in the following being printedprint qq(<TD>$obj->attr1()</TD>\n);
If I however assign the result of the method call to a variable then all is well<TD>DirectEntry=SCALAR(0x818e97c)->attr1()</TD>
The result is as I expectmy $attr1 = $obj->attr1() print qq(<TD>$attr1</TD>\n);
My question is how can I avoid having to assign the result of the method call to a local variable before printing it ?<TD>ITY101</TD>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Printing the result of calling an instance method
by davorg (Chancellor) on Apr 02, 2001 at 12:09 UTC | |
by tilly (Archbishop) on Apr 02, 2001 at 13:27 UTC | |
by davorg (Chancellor) on Apr 02, 2001 at 13:33 UTC | |
by ColtsFoot (Chaplain) on Apr 02, 2001 at 12:47 UTC | |
|
Re: Printing the result of calling an instance method
by arturo (Vicar) on Apr 02, 2001 at 17:28 UTC | |
|
Re: Printing the result of calling an instance method
by busunsl (Vicar) on Apr 02, 2001 at 10:44 UTC |