﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Knowledgebase » Knowledgebase » Programming » Perl</title><generator>InstantKB.NET 2.0.4</generator><description>Knowledgebase</description><link>http://www.webhost4life.com/HostingKB/</link><webMaster>kb@webhost4life.com</webMaster><lastBuildDate>Fri, 20 Nov 2009 19:46:37 GMT</lastBuildDate><ttl>20</ttl><item><title>Why cannot upload file through my web site?</title><link>http://www.webhost4life.com/HostingKB/Goto50493.aspx</link><description>When upload file through web site, web site user need to have write permission for the folder which used to store file.&lt;br /&gt;Please click &amp;lt;&lt;a href="http://www.webhost4life.com/HostingKB/KnowledgebaseArticle50482.aspx"&gt;here&lt;/a&gt;&gt; for instruction of how to set permission.&lt;br /&gt;&lt;br /&gt;Windows Account :&lt;br /&gt;For ASP.NET application, web user is "Network Service" (for win2003 &amp;amp; win2008) and "ASPNET" (for win2000)&lt;br /&gt;For other applications, web user is "IUSR_memberID"&lt;br /&gt;&lt;br /&gt;Linux Account:&lt;br /&gt;Please change folder permission to 777&lt;br /&gt;&lt;br /&gt;*For security reason, please only grant write permission for the folder(s) which need it.&lt;br /&gt;</description><pubDate>Mon, 29 Jun 2009 05:22:57 GMT</pubDate><dc:creator>Mark</dc:creator></item><item><title>Why is my perl script printing its entire source code instead of running it?</title><link>http://www.webhost4life.com/HostingKB/Goto50132.aspx</link><description>Make sure you name your perl script to .pl before running it.  If it is absolutely necessary that you run your script under different file extensions (such as .cgi or .plx), you may go to control panel -&gt;  Site Admin -&gt; Set Script Map to set script mapping for other file extensions to Perl.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;</description><pubDate>Wed, 20 May 2009 18:40:58 GMT</pubDate><dc:creator>Mark</dc:creator></item><item><title>What is my physical path?</title><link>http://www.webhost4life.com/HostingKB/Goto50124.aspx</link><description>&lt;font face="MS Sans Serif" size="2"&gt;                    &lt;/font&gt;You can see your physical path by logging into your Hosting Control Panel -&gt; Account. You should see your physical path under "Base Directory:" section&lt;strong&gt;&lt;font face="verdana, arial" size="1"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/strong&gt;</description><pubDate>Thu, 26 Feb 2009 16:59:56 GMT</pubDate><dc:creator>Mark</dc:creator></item><item><title>What is the location of the SendMail program?</title><link>http://www.webhost4life.com/HostingKB/Goto50127.aspx</link><description>&lt;font face="MS Sans Serif" size="2"&gt;Sendmail programs do not exist in theWindows environment, therefore there is no such location.  You'll have touse SMTP in your perl script our use our sample &lt;a target="_self" href="http://www.webhost4life.com/hostingKB/KnowledgebaseArticle50120.aspx"&gt;perl script&lt;/a&gt; here.&lt;br /&gt;&lt;br /&gt;In Linux environment, please use phpmailer to send email. For details please &lt;a href="KnowledgebaseArticle50140.aspx"&gt;check here.&lt;/a&gt;&lt;br /&gt;&lt;/font&gt;</description><pubDate>Tue, 24 Feb 2009 10:19:45 GMT</pubDate><dc:creator>Mark</dc:creator></item><item><title>How do I send e-mail with Perl Script ?</title><link>http://www.webhost4life.com/HostingKB/Goto50120.aspx</link><description>&lt;font face="Arial" size="1"&gt;&lt;font face="MS Sans Serif" size="2"&gt;Here is a sample for &lt;/font&gt;&lt;/font&gt;&lt;font face="Arial" size="1"&gt;&lt;font face="MS Sans Serif" size="2"&gt;sending e-mail with PERL scripts&lt;/font&gt;&lt;/font&gt;&lt;font face="Arial" size="1"&gt;&lt;font face="MS Sans Serif" size="2"&gt;.&lt;br /&gt;&lt;br /&gt;use strict;&lt;br /&gt;use Net::SMTP;&lt;br /&gt;&lt;br /&gt;my $message = "From: sender\@domain.com&lt;br&gt;To:&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="Arial" size="1"&gt;&lt;font face="MS Sans Serif" size="2"&gt;receiver&lt;/font&gt;&lt;/font&gt;&lt;font face="Arial" size="1"&gt;&lt;font face="MS Sans Serif" size="2"&gt;\@&lt;/font&gt;&lt;/font&gt;&lt;font face="Arial" size="1"&gt;&lt;font face="MS Sans Serif" size="2"&gt;domainTo&lt;/font&gt;&lt;/font&gt;&lt;font face="Arial" size="1"&gt;&lt;font face="MS Sans Serif" size="2"&gt;.com&lt;br&gt;Subject: Hello World&lt;br&gt;&lt;br&gt;Test&lt;br&gt;&lt;br&gt;";&lt;br /&gt;print "Message:&lt;br&gt;";&lt;br /&gt;print $message;&lt;br /&gt;print "&lt;br&gt;";&lt;br /&gt;&lt;br /&gt;my $DEBUG = 1;&lt;br /&gt;&lt;br /&gt;my $ServerName = "smtp.domain.com";&lt;br /&gt;my $ServerAccount = "****\@domain.com";&lt;br /&gt;my $ServerPwd = "********";&lt;br /&gt;my $MailFrom = "&lt;/font&gt;&lt;/font&gt;&lt;font face="Arial" size="1"&gt;&lt;font face="MS Sans Serif" size="2"&gt;sender&lt;/font&gt;&lt;/font&gt;&lt;font face="Arial" size="1"&gt;&lt;font face="MS Sans Serif" size="2"&gt;\@domain.com";&lt;br /&gt;my $MailTo = "receiver\@domainTo.com";&lt;br /&gt;&lt;br /&gt;print "Server variables assigned&lt;br&gt;";&lt;br /&gt;&lt;br /&gt;my $smtp = Net::SMTP-&gt;new($ServerName, Hello =&gt; "domain.com",  Debug =&gt; 1);&lt;br /&gt;die "Couldn't connect to server" unless $smtp;&lt;br /&gt;print "Server connection opened&lt;br&gt;";&lt;br /&gt;&lt;br /&gt;if ( !$smtp-&gt;auth($ServerAccount, $ServerPwd) ) {&lt;br /&gt;print "authentication failed or not needed&lt;br&gt;";&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if ( !$smtp-&gt;mail( $MailFrom ) ) {&lt;br /&gt;print "sender not accepted&lt;br&gt;";&lt;br /&gt;exit 1;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;if (!$smtp-&gt;to( $MailTo ) ) {&lt;br /&gt;print "addressee not accepted&lt;br&gt;";&lt;br /&gt;exit 1;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;print "Server variables checked&lt;br&gt;";&lt;br /&gt;&lt;br /&gt;my $maildata = $message;&lt;br /&gt;$smtp-&gt;data();&lt;br /&gt;$smtp-&gt;datasend( $maildata );&lt;br /&gt;$smtp-&gt;dataend();&lt;br /&gt;$smtp-&gt;quit();&lt;br /&gt;$smtp-&gt;quit;&lt;br /&gt;&lt;br /&gt;print "Finished sending email&lt;br&gt;";&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;                    &lt;/font&gt;</description><pubDate>Sun, 14 Dec 2008 12:10:09 GMT</pubDate><dc:creator>Mark</dc:creator></item><item><title>Why is my SSI #exec cgi="test.pl" returning extra header info?</title><link>http://www.webhost4life.com/HostingKB/Goto50133.aspx</link><description>&lt;font face="MS Sans Serif" size="2"&gt; This is because your are running onWindows Server. To fix this issue, you will need to putthe following line before you call the SSI.  &lt;/font&gt;&lt;blockquote&gt;&lt;p align="left"&gt;&lt;font face="MS Sans Serif" size="2"&gt;&lt;font color="#0000ff"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;font face="MS Sans Serif" size="2"&gt;&lt;font color="#0000ff"&gt;&amp;lt;meta name="hideHeader" content=""&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;font face="MS Sans Serif" size="2"&gt;Example:&lt;/font&gt;&lt;/p&gt;&lt;p align="left"&gt;&lt;font face="Arial" size="1"&gt;&lt;font color="#0000ff"&gt;&lt;font face="MS Sans Serif" size="2"&gt;&amp;lt;meta name="hideHeader" content=""&lt;br /&gt;&amp;lt;!--#exec cgi="test.pl"--&gt; &lt;/font&gt;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/blockquote&gt;</description><pubDate>Sun, 30 Nov 2008 17:50:32 GMT</pubDate><dc:creator>Mark</dc:creator></item><item><title>Where is my cgi-bin directory?</title><link>http://www.webhost4life.com/HostingKB/Goto50130.aspx</link><description>&lt;font face="Arial" size="2"&gt;&lt;font face="MS Sans Serif"&gt; Your account is already enabled to runscripts.  You do not need a cgi-bin to run scripts. To implement,simply upload your scripts to your account. You also have the option ofcreating a CGI-BIN folder yourself and running your script from within.&lt;/font&gt;&lt;/font&gt;</description><pubDate>Sun, 30 Nov 2008 17:25:37 GMT</pubDate><dc:creator>Mark</dc:creator></item><item><title>What is the path to my Perl Script?</title><link>http://www.webhost4life.com/HostingKB/Goto50129.aspx</link><description>&lt;font face="MS Sans Serif" size="2"&gt;                    The path is &lt;font color="#0000ff"&gt;c:\perl\bin&lt;/font&gt;                    &lt;/font&gt;</description><pubDate>Sun, 30 Nov 2008 17:07:11 GMT</pubDate><dc:creator>Mark</dc:creator></item><item><title>Do you have Form Mail available for use?</title><link>http://www.webhost4life.com/HostingKB/Goto50118.aspx</link><description>&lt;p&gt;&lt;font face="MS Sans Serif" size="2"&gt;Yes. &lt;/font&gt;&lt;/p&gt;&lt;p&gt;&lt;font face="MS Sans Serif" size="2"&gt;Please go to your control panel -&gt; Mail -&gt; Form Mail&lt;/font&gt;&lt;/p&gt;</description><pubDate>Sun, 30 Nov 2008 16:50:56 GMT</pubDate><dc:creator>Mark</dc:creator></item></channel></rss>