Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

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?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2020-02-21 03:45 GMT
Find Nodes?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?

    Results (93 votes). Check out past polls.