in reply to Re: Interesting CGI Problem...
in thread Interesting CGI Problem...

You certainly have a good point about using a hash as a dispatch table, but I utterly fail to understand why you would need to use eval. How about:

my $dispatch = $nodes{$query} || $nodes{_err}; $dispatch->();

Or if you really like to put everything in one line:

( $nodes{$query} || $nodes{_err} )->();
--
edan

Replies are listed 'Best First'.
Re^3: Interesting CGI Problem...
by kiat (Vicar) on Aug 29, 2004 at 08:21 UTC
    Hi edan,

    Thanks for pointing out. I missed out the catch error code below:

    if ($@) { dienice(); }