Gossamer Forum
Home : General : Perl Programming :

Code Problem!

Quote Reply
Code Problem!
    Hello!
I have this code:
Code:
foreach $line (@lines)
{
($log_query, $log_query_calls) = split(/\|/,$line);
if ("$in{'query'}" eq $log_query)
{
$log_query_calls++;
print KEYWORDS ("$log_query|$log_query_calls\n");
$addnew=1;
}
else
{
print KEYWORDS $line;
}
}

I am using this as a search log for Links 2(this is just a piece of the code).
The "problem" is that if someone enters two queries(ie. banner+internet) the script will log
it as "banner internet". But I want to split that in two different words so the script can look for a
line with "banner" and another with "internet".
Any ideas?

Thiago Moretti
PS. Sorry for my poor english!!