in reply to Re: mod_perl advice required
in thread mod_perl advice required

strict is your friend. :) It's telling you that you need to explicitly scope $filename and @rows. Try this:

my @rows;
if (@files) {
    foreach my $filename(@files){
$filename = substr($filename,0,-4); my $sth = $cbh->prepare("SELECT id, title, summary FROM resourc +e WHERE id =?"); $sth->execute($filename); while (my $ref = $sth->fetchrow_hashref()){ my $title = $ref->{title}; my $id = $ref->{id}; push @rows, { ID => $id, TITLE => $title }; } } } my $template = HTML::Template->new(filename => 'ee_search.tmpl'); $template->param(SEARCH_STRING => $search); $template->param(ROWS => \@rows);

-Matt

Replies are listed 'Best First'.
Re: Re: Re: mod_perl advice required
by shirkdog_perl (Beadle) on Feb 25, 2003 at 16:34 UTC
    In a way, use strict is more important than warnings.