in reply to Re^4: using template on same page
in thread using template on same page

{ list => \@$names } is the same as { list => $names }

I'm guessing you just need to change your template to

<a href='#' class='inforno'>[% name.0 %] [% name.1 %] [% name.2 %]</a>

poj

Replies are listed 'Best First'.
Re^6: using template on same page
by bigup401 (Pilgrim) on Sep 16, 2018 at 19:06 UTC

    i tried that bt the problem i get repeated output like

    FOO FOO BAR BAR MOO MOO

    i changed my code from

    my $select = $DBH->prepare("SELECT FOO, BAR, MOO FROM tble WHERE CONCA +T(FOO, ', ', BAR, ', ', MOO) LIKE ?"); $select->execute('%'.$info.'%'); $names = $select->fetchall_arrayref(); foreach $names ( @$names) { ($variable1, $variable2, $variable3) = @$names; } }

    to this

    my $select = $DBH->prepare("SELECT FOO, BAR, MOO FROM tble WHERE CONCA +T(FOO, ', ', BAR, ', ', MOO) LIKE ?"); $select->execute('%'.$info.'%'); $names = $select->fetchrow_arrayref(); ($variable1, $variable2, $variable3) = @$names; }

      I don't see $variable1, $variable2, $variable3 used anywhere in your code posted here, what are they for ? And what is the value of $info ?

      poj

        but its there wen u look at the code and $info is just user input to confirm weather there is an input from user to execute the condition

        but anyway am trying it differently coz it has given alot problem to me and monks to figure it out. just gone try other method to accomplish wat i want