>Dear Dr. Ruud,
>
 >    Thanks it works. I change this line into:  
>
 >my $name = ($query_obj->param('text_field') or ' ');

>But I am not sure why I need to add the (or '').  I
>see nowhere in CGI.pm talking about it. Can you
>explain it in a liitle bit detail? Also what am I
>supposed to do if I want results not to appear on the
>same page as those in the form page?

>Thanks,

>Li

or '' is a way to avoid syntax errors... cannot remember the exact
error.
Perl best Practices recommends using  q {}; due to readability.
 
$name = ($query_obj->param('text_field') or q {});

In a CGI program I wrote here is how I used it....

$q->radio_group

        ( -name=>'view',
        -value=>[qw{All-Clients Backup-Tapes PACS-Fuji Heartlab
StreamLine-
      Health Archiver-Status Tape-Drive-Status}],
        -linebreak=>'true', -attributes=>\my %attributes),
        $q->defaults(-name=>'Default'),$q->submit('form','Send Form'
        );
                my $which_radio_button = $q->param('view') || q{};
                if ( $which_radio_button eq 'All-Clients' ) {


Derek Bellner Smith
Unix Systems Engineer
Cardinal Health Dublin, Ohio
[EMAIL PROTECTED]

Cardinal Health -- Working together. For life. (sm)
_________________________________________________

This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise private information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the email by you is prohibited.

Dansk - Deutsch - Espanol - Francais - Italiano - Japanese - Nederlands - Norsk 
- Portuguese - Svenska: www.cardinalhealth.com/legal/email

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to