Janek Schleicher wrote:
>
> Alaric Joseph Hammell wrote at Tue, 11 Jun 2002 18:06:46 +0200:
>
> > So, I have these two subroutines, match_state() and display_form that I am having
>problems with.
> > If the script is run with $state getting the function
> >
> > argument, it prints a blank pulll-down menu and is able to print "Quadrants
> >
> > covering West Virginia" . But, when $state is explicity set to "West Virginia",
>it displays the
> > options as they should be (pull-down menu is complete).
> >
> > Any ideas on what could be wrong?
> >
> > thanks,
> > Al
> >
> >
> > sub match_state($FORM{$name})
> > ...
> > #### dont think it is assigning things to %state_hash for $href (@landhashes) {
> > if ($href->{st_name1} eq "$state") {
> > #print "$href->{quad_name}, $href->{st_name1}\n" ;
> > $state_hash{"$href->{quad_name}"} = "$href->{st_name1}" ;
> ^
> > }
> > }
> > elsif ($href->{st_name2} eq "$state") {
> > #print "$href->{quad_name}, $href->{st_name1}\n" ;
> > $state_hash{"$href->{quad_name}"} = "$href->{st_name1}" ;
> ^
> > }
> > elsif ($href->{st_name3} eq "$state") {
> > #print "$href->{quad_name}, $href->{st_name1}\n" ;
> > $state_hash{"$href->{quad_name}"} = "$href->{st_name1}" ;
> ^
> > }
> > elsif ($href->{st_name4} eq "$state") {
> > #print "$href->{quad_name}, $href->{st_name1}\n" ;
> > $state_hash{"$href->{quad_name}"} = "$href->{st_name1}";
> ^
> > }
> > }
> > }
> > }
> > }
>
> It's a real crime to copy source code.
> Here you see why.
>
> Cheerio,
> Janek
>
Janek,
Im sorry but I dont quite understand your statements. I sincerely hope
that you are not accusing me of copying source code. I truly dont know
why you would think that and if you dont I apologize for this part of my
response. I simply posted with a question about my source code that I
thought someone could help with.
--------------------------------------------------------------------
Now, I assume that the carrots under "$href->{st_name1}" are where you
think there is a problem. After debugging since I posted this plea for
help, I came to discover the problem. It failed all of the if and elsif
tests. I found eventually that I had an extra white space character on
the string being passed into "$state" which was preventing the TRUE
result and never doing anything in the loop(which is also why it would
work when I passed in the string explicitly). I am now working out this
issue. Thank you for your help.
Sincerely,
Al
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]