Jason Larson wrote:
> 
> I'm still new to Perl myself, so I can't tell you exactly what's happening,
> but it looks like $result_value1 is undef when it gets to the if statement.
> I think a better way to accomplish what you're trying to do is simply:
> 
>   my $result_value1;
>   if ($result_value) { #$result_value1 is defined
    ^^^^^^^^^^^^^^^^^^                      ^^^^^^^
This is _NOT_ testing whether $result_value1 is defined or not (in fact
it is not testing $result_value1 at all :-), it is testing whether
$result_value1 is true or false which is not the same thing.

   if ( defined $result_value1 ) { #$result_value1 is defined


>      $a= substr($result_value1, 0, 8);
>      $b= substr($result_value1, 8, 2);
>      $c= substr($result_value1, 10, 2);
>   } else { #$result_value1 is still undef
>      return (" ", " ", " ");
>   }



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to