corrected: foreach to generate parameter calls

2004-10-05 Thread Rick Triplett
Sorry; I forgot to include all the code: I am trying to turn a repetitive assignment into a loop for HTML::Template (a Perl loop, not an HTML::Template Loop). I'm given a series of scalars (three shown below) and I have commented out the $tmpl->param calls (also below, which worked fine). I inte

foreach to generate parameter calls

2004-10-05 Thread Rick Triplett
I am trying to turn a repetitive assignment into a loop for HTML::Template (a Perl loop, not an HTML::Template Loop). I'm given a series of scalars (three shown below) and I have commented out the $tmpl->param calls (also below, which worked fine). I intended the foreach loop to replace the lon

Re: template re HTML::Template choking

2004-09-29 Thread Rick Triplett
On Sep 29, 2004, at 9:45 AM, Wiggins d Anconia wrote: Here is the template: student_id = The above line does not have a "NAME" attribute which I think is required. And should the "VALUE" be "DEFAULT"?? HTH, http://danconia.org Yes, it is clear that I've botched line 13. I am grateful for you

Re: HTML::Template still choking

2004-09-29 Thread Rick Triplett
Thanks for mentioning that H::T has "debugging options" -- I didn't realize this. I've looked at H::T on CPAN and found that much of what is there is over my head. A debugging option sounds like just what I need. I'll go back to the docs on H::T and see if I can figure them out! On Sep 29, 200

template re HTML::Template choking

2004-09-29 Thread Rick Triplett
Here is the template: student_info_viewer student_id = http://www.x.com/cgi-bin/student_info_viewer.cgi"; method="post" name="FormName">

HTML::Template still choking

2004-09-29 Thread Rick Triplett
HTML::Template is still choking, giving the error... HTML::Template->new() : Syntax error in tag at /XXX[here I'm ommiting the path]/data/templates/student_info.tmpl : 13. at /usr/local/lib/perl5/site_perl/5.005/HTML/Template.pm line 2243. I now think the fault is in my Perl code which handles

HTML::Template is choking

2004-09-28 Thread Rick Triplett
HTML::Template is choking with the complaint ... HTML::Template->new() : Syntax error in tag at /XXX[here I'm ommiting the path]/data/templates/student_info.tmpl : 13. at /usr/local/lib/perl5/site_perl/5.005/HTML/Template.pm line 2243. This is a typical line from my template ...

Problem with flock

2004-09-27 Thread Rick Triplett
Variations on the following code snippet have run successfully before, but now the compiler halts with the complaint " Bareword "LOCK_EX" not allowed while "strict subs" in use at student_info_viewer.cgi line 47" Can someone help me see what I am overlooking? # Declare the 'working' datahash, th

compile error

2004-02-14 Thread Rick Triplett
Help -- I'm getting the following compile error: Can't declare scalar assignment in my at /big/dom/xlibertylearning/cgi-bin/reader_writer.cgi line 12, near ");" The offending code is ... #!/usr/bin/perl -w use strict; use DB_File; # module for Berkeley DBM w/ DB_HASH file type use Fcntl; # to help

quote marks in DBM

2004-02-08 Thread Rick Triplett
The following snippet of code is from "Programming the Perl DBI" and shows the storing of a hash element that contains both a comma and a sort-of double quote. (In the book, double quotes are shown; in the book-file, it looks like back tics and single quotes.) ... ### Insert some data rows $dat

cgi mystery may kill me

2003-10-29 Thread Rick Triplett
is it possible that I am wrong about this? Assuming it is looking in the right place, why does my image flunk the binary and open file tests? What can cause this? Alas, the mystery haunts me. All bright ideas and educated guesses will be accepted with gratitude. Thanks! Rick Triplett

help with syntax error

2003-10-29 Thread Rick Triplett
Can someone please help me find the syntax error in the following practice exercise. The perl compiler says: syntax error at line 7 near ") {" but I cannot see it! #!/usr/bin/perl -w print "Enter the radius: \n"; chomp ($radius = ); $area = $radius*$radius*3.14 if ( $radius <= 0 ) { pr