I Can't make scalarref work!?

  • Lars Sjölund

    Lars Sjölund - 2000-06-16

    If I use filename it works as expected, but I want to load the user template in $MALL and strip comments and convert extended chars (like )
    use HTML::Template;
    # open the html template
    $MALL = &load_include('../www/tmpl/hemsida.inc');
    # here comments are stripped and chars converted #
    # Assign it to new Template
    my $template = HTML::Template->new(scalarref => $MALL);
    I've tried the 3 different ways..
    I'm I doing something wrong?

    • Sam Tregar

      Sam Tregar - 2000-08-15

      It looks to me like you're not passing a scalarref!  Try:

      my $template = HTML::Template->new(scalarref => \$MALL);



Log in to post a comment.