Hi,
Your going to need to use a global to do what you want.
my $tags = shift;
my $query = $tags->{query};
my $file = 'default.html';
if ($query =~ /...../) {
$file = 'foo.html';
}
...
open (FH, "< /path/to/$file");
read (FH, my $text, -s FH);
close FH;
return $text;
}
It may take some more customizations..
Cheers,
Alex
--
Gossamer Threads Inc.
Your going to need to use a global to do what you want.
Code:
custom_header => sub { my $tags = shift;
my $query = $tags->{query};
my $file = 'default.html';
if ($query =~ /...../) {
$file = 'foo.html';
}
...
open (FH, "< /path/to/$file");
read (FH, my $text, -s FH);
close FH;
return $text;
}
It may take some more customizations..
Cheers,
Alex
--
Gossamer Threads Inc.