John Jetmore wrote:
> On Tue, 25 Jul 2006, Marc Perkel wrote:
>
>   
>> print "insert ignore into karma (ip,expire,hostname) values 
>> ('",$ip_address,"',",time()+200000,",'",$hostname,"');\n";
>>     
>
> variables interpolate in "" quote strings in perl, so the only thing you 
> have to exclude from the strings is the time()+200000 expression.  Then 
> you can join the pieces with the '.' operator, which is the string 
> concatenate operator:
>
> mysql("insert ignore into karma (ip,expire,hostname) values " .
>       "('$ip_address'," . time()+200000 . ",'$hostname')");
>
> (if memory serves you don't need the semicolon to terminate the statement 
> when using the perl modules w/ mysql, and you definitely don't need the 
> newline).
>
> and then use $_[0] or shift it into another var to use.
>
> --John
>   

> Thanks - let me give that a try.
-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to