sending mail with Perl and sendmail

print "Content-type: text/html\n\n";
$title='Perl Mail demo';
$from= 'webmaster@YOURDOMAIN.COM';
$subject='YOUR SUBJECT';
open(MAIL, "|/usr/sbin/sendmail -t");
## Mail Header
print MAIL "To: $to\n";
print MAIL "From: $from\n";
print MAIL "Subject: $subject\n\n";
## Mail Body
print MAIL "This is a test message from! You can write your
mail body text here\n";
print "$title\n\n\n";
## HTML content sent, let use know we sent an email
print "
A message has been sent from $from to $to

Getting a security token from your salesforce instance

To access Salesforce via a desktop application or other API-based application, you must replace your current password with a combination of your password and a security token:

1 Log in to Salesforce via the browser to request your security token.

2 Go to Setup -> My Personal Information -> Reset Security Token.

3 Click the Reset Security Token button to trigger an email which will contain your security token.

4 Select and copy the token from the email.

db_query in drupal .... creating sql queries the drupal way (Drupal 6)

good documentation is here: getting a single value: use db_result

This sites Drupal 7 wiki page for creating Drupal 7 queries is here:

$result=db_result(db_query('Select uid from {users} where uid = %d',5));

getting multiple rows: use db_query