or download this
$Agent1=$dbh->prepare('select substring_index(substring_index(substrin
+g_index(Name,"$$$",1),"$$",1),"\$",-1) as Phone_no, substring_index(s
+ubstring_index(Name,"$$$",1),"$$",-1) as Mail_Id from CustomFieldValu
+es where CustomField =291 and Name like "$name%";') || die "$DBI::er
+rstr";
...
( $phone_no,$mail )= $Agent1->fetchrow_array;
print "Phone:\t$phone,Mail:\t$mail\n";