in reply to If Statement

if ( $name =~ /$Dealid/ ) { - you have your opening parenthesis in the wrong place.

Replies are listed 'Best First'.
Re^2: If Statement
by kdelph (Initiate) on Apr 01, 2005 at 19:23 UTC
    When I put the parenthesis that way, I no longer get syntax error but when I put in my Deal ID into the form and hit submit I don't get my information on the screen instead it acts like a comparison and PERL returns 0 (true) or 1 (false) all that displays to the screen is 1 false. The number is in the log though that I am typing in and it should print to the screen. Any idea what I'm doing wrong ?
      You're not using $DealID = $query->param( MY_PARAM_NAME_HERE );, so how do you expect to read it from the CGI stream?
        I put that in and it is still not working maybe I put the syntax in wrong ?

        {
        warn("Couldn't get lock for reading: $!");
        alarm(0);
        close LOG;
        return undef;
        }>br/>
        $Dealid = $query->param($name);

        while ($line = <LOG>)
        {
        chomp($line);
        ($Time, $Dealid, $Clientid, $CurrencyPair) = split(/\,/, $line);
        #if ($name =~ /$Dealid/)
        {
        unshift(@rows,