in reply to Printing a strange 1 on page.

Ok,I should be honest to say:It is hard for me to understand!

Replies are listed 'Best First'.
Re^2: Printing a strange 1 on page.
by AnomalousMonk (Archbishop) on Dec 15, 2011 at 08:55 UTC

    ikegami:

    "The process() method then returns 1 to indicate success", which you proceed to print. Don't print it if you don't want to see it.

    Just to be perfectly clear, the statement printing return value of  process() method:
        print $tt->process('page.tt', $vars) || die $tt->error();
    A statement not printing return value of  process() method:
        $tt->process('page.tt', $vars) || die $tt->error();

Re^2: Printing a strange 1 on page.
by GrandFather (Saint) on Dec 15, 2011 at 08:13 UTC

    What are you struggling to understand? As indicated by NetWallah above the default behaviour of TT is to "print" its output so calling code doesn't need to (in fact as you have observed, shouldn't) print any "output".

    What you are printing is the success result returned by process - don't do that.

    True laziness is hard work