Many thanks to Andrew and Mike — your suggestions worked and gave me a lot to think about as well!
That’s what love about this mailing list: I always learn a lot! Rick Triplett > I hope somebody has replied already. > If not, in general you are reading data from DATA, > creating an array and a hash, and then creating an > html file using the Template Toolkit. > > I think much of it looks good, but I see no > use Template::Toolkit > or anything similar. > Do you have that? I suspect you do. > Maybe you should post that part too. > > > Also, this line looks suspicious to me: > my %list = (list => \@courses); > > Maybe that is intended to be an array ref. > > Perhaps right after that you should put this: > > print "\%list contains this:\n\n"; > foreach my $key (sort keys %list){ > print "$key - $list{$key}\n"; > } > On Oct 28, 2018, at 4:50 PM, Andrew Solomon <and...@geekuni.com> wrote: > > Hi Rick, > > The bug is that you're calling > > my %list = (list => \@courses); > > when you should be calling > > my %list = (courses => \@courses); > > If only there were 'strict' and 'warnings' for Template! :-) > > Andrew > > On Sun, Oct 28, 2018 at 8:52 PM Rick T <p...@reason.net > <mailto:p...@reason.net>> wrote: > As a novice in perl I realize that it’s a bit presumptuous for me to attempt > references and complex data structures. But I had a need and gave it a shot — > a failing shot. I’ve been fiddling with my failure, almost mindlessly, all > weekend; now I need some help. > > Below is the template segment I am trying to populate with data, and > following it is the segment of code that attempts to call it. The output I > get in my browser is persistently empty, with every instance of [% %] being > replaced with blanks.