Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Problems Processing Hash within Cgi Script

by r34d0nl1 (Pilgrim)
on Dec 22, 2004 at 18:09 UTC ( #416849=note: print w/replies, xml ) Need Help??


in reply to Problems Processing Hash within Cgi Script

First I think that yoou should make sure that your hash is populated
(something that you've probably done :p )
Anyway I thing that the best method is to put some warnings during the processing
in order to make sure that it is processed correct.
Anyway another good practice is to send the html to a variable and then print it.
It avoid to have the page breaked in the middle when an error occurs.
Generally we would like to use something like this:
my $html = qq {<SELECT NAME="partNumber" SIZE="1" >}; foreach my $key (sort keys %{$HASHDATAFROMLIBRARYFILE{TIMING}}) { #my $p = \%{$rpt{$HASHDATAFROMLIBRARYFILE}{TIMING}{$key}}; warn "\n Here we are $key "; # just to make sure it is executed $text .= qq { $html .= qq { <OPTION VALUE='$keys' @{[ ( ( defined($rpt{PART_NUMBER}) ) && ($FORM{CellName} eq $keys ) ) ? 'SELECTED' : '' ]} >$keys</OPTION> }; }

I hope it could help you.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://416849]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2019-10-21 15:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?