On 07/31/2006 03:45 AM, Dr. Claus-Peter Becke wrote:
dear members,
using a subroutine's resulting argument in an if-clause i compare this
string with another term. but although each of the term has the value of
the other i don't achieve the result i'm looking for.
if (($Q::partofspeech eq 'n')) {
$table = $Q::partofspeech;
$col = 'n_form';
$case = $Q::case;
You shouldn't normally use "&" to invoke functions. Also, make
sure your data is what you think it is:
print qq{databaserequest = "@{[
databaserequest($col,$table,$case) ]}"\n};
print qq{lexicalentry = "$Q::lexicalentry"\n};
if (&databaserequest_noun($col, $table, $case) eq $Q::lexicalentry) {
print $q->p("the entry is part of the database");
}else { print $q->p("the entry isn't part of the database");}
elsif ...
although for example the values of &databaserequest_noun and
$Q::lexicalentry both are 'Italy' i get the resulting message "the entry
isn't part of the database". what's going wrong?
best regards
claus-peter becke
The values might not be equal. Check it with debugging code as
above.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>