Hi Stephen,
a few comments on your code:
On Tuesday 11 Jan 2011 17:44:32 Stephen Allen wrote:
> I have sucessfully created as Radio-group along the lines of
>
> @TiesArray = SSDArray($uniqueorgref);
Add:
{{{
use strict;
use warnings;
}}}
to the start of your script. Then declare all variables using "my":
http://perl-begin.org/tutorials/bad-elements/#no-strict-and-warnings
> if (@TiesArray[0] ne "") {
>
> @TiesDesc = SSDDescArray($uniqueorgref);
You should indent properly. See:
http://perl-begin.org/tutorials/bad-elements/#no-indentation
> %TiesHash = @TiesDesc;
Are you sure you want to initialise a hash from an array this way?
> $q = new CGI;
Avoid indirect object notation:
http://perl-begin.org/tutorials/bad-elements/#indirect-object-notation
And you should call the CGI object with a more meaningful name than "$q".
> print $q->start_form(-method=>"POST",
> -action=>"http://....../cgi-bin/ViewQuote.pl"),
> $q->p("The system has identified .... etc and click the SEND
> button."),
> $q->hidden("uniqueorgref", $uniqueorgref),
> $q->radio_group(-name=>"hideordNo", -values=>\...@tiesarray, -
> linebreak=>"true", -labels=>\%TiesHash),
> $q->submit("Send"),
> $q->hr,
> $q->end_form;
I don't like CGI.pm's HTML generation methods too much (they are bloat if you
ask me). A templating system such as the Template Toolkit will be better:
http://perl-begin.org/uses/text-generation/
> }
>
>
> My problem is that the hash that describes the radio group values -
> %TiesHash - (and should replace them on screen) is not operating. Any
> thoughts?
You can try using a debugger to see where it goes wrong:
http://perl-begin.org/topics/debugging/
Regards,
Shlomi Fish
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
My Public Domain Photos - http://www.flickr.com/photos/shlomif/
Chuck Norris can make the statement "This statement is false" a true one.
Please reply to list if it's a mailing list post - http://shlom.in/reply .
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/