<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Herself&#039;s Webtools &#187; perl</title>
	<atom:link href="http://herselfswebtools.com/category/perl/feed" rel="self" type="application/rss+xml" />
	<link>http://herselfswebtools.com</link>
	<description>Scripts, HowTos, Templates, Plugins, Widgets, Tips</description>
	<lastBuildDate>Fri, 18 Nov 2011 15:47:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>How to convert your old Perl-CGI scripts to work in your blog using PHP</title>
		<link>http://herselfswebtools.com/2008/06/how-to-convert-your-old-perl-cgi-scripts-to-work-in-your-blog-using-php.html</link>
		<comments>http://herselfswebtools.com/2008/06/how-to-convert-your-old-perl-cgi-scripts-to-work-in-your-blog-using-php.html#comments</comments>
		<pubDate>Mon, 23 Jun 2008 10:00:40 +0000</pubDate>
		<dc:creator>Linda MacPhee-Cobb</dc:creator>
				<category><![CDATA[cgi]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://herselfswebtools.com/?p=240</guid>
		<description><![CDATA[The original TimesToCome site was created in 1997. The web has changed a great deal since then but my scripts hadn&#8217;t. I just hacked my blogs to use the PERL scripts. Converting them to work in your blog without using PERL or CGI is actually quite simple. The first thing to do is convert your [...]]]></description>
			<content:encoded><![CDATA[<p>The original <a href="http://timestocome.com">TimesToCome site</a> was created in 1997.  The web has changed a great deal since then but my scripts hadn&#8217;t.  I just hacked my blogs to use the PERL scripts.  Converting them to work in your blog without using PERL or CGI is actually quite simple.</p>
<p>The first thing to do is convert your old CGI scripts to PHP. Your forms will remain the same except for the name of the script they are calling. ( &lt;form method=&#8221;post&#8221; action=&#8221;new-script-url&#8221;&gt; )  I found that <a href="http://www.evolt.org/article/User_Friendly_Forms_in_PHP/20/60144/index.html">User Friendly Forms in PHP</a>, and <a href="http://www.onlamp.com/pub/a/php/2004/08/26/PHPformhandling.html">PHP Form Handling</a> gave me enough information to convert the forms from PERL to PHP.  Most of what works in PERL, works in PHP, you&#8217;ll find very little needs to be changed. ( <a href="http://www.amazon.com/gp/search?ie=UTF8&amp;keywords=1932111093&amp;tag=tim01-20&amp;index=blended&amp;linkCode=ur2&amp;camp=1789&amp;creative=9325">&#8216;PHP Black Book&#8217;</a><img style="border:none !important; margin:0px !important;" src="http://www.assoc-amazon.com/e/ir?t=tim01-20&amp;l=ur2&amp;o=1" border="0" alt="" width="1" height="1" /> is the best book I&#8217;ve found so far. )</p>
<p>Once  you have a working PHP form you need to incorporate it into your blog.  To do this you need to create a page template.  The easiest way is to copy an existing page template in your theme.  The archives.php page usually works well.</p>
<p>Remove the archives information from the page.  I deleted everything after &lt;div id=&#8221;content&#8221; class=&#8221;pages&#8221;&gt; down to the matching &lt;/div&gt; tag for that division.  Your template may be slightly different.</p>
<p>Now copy and paste your PHP form &#8211; everything between &lt;body&gt; and &lt;/body&gt; into that space between &lt;div id=&#8221;content&#8221; class=&#8221;pages&#8221;&gt; and &lt;/div&gt;.</p>
<p>Rename the page to something useful, and don&#8217;t forget to change the &#8216;Template Name: xxxx &#8216; in the template.</p>
<p>Now log into your WordPress or other blog.  Create a new page, name it something useful.  Then go to the templated drop down menu (&#8216;Templates&#8217;) and select your newly created template from the menu.  Save and publish.</p>
<p>If you wish to use multiple pages for your form just create multiple pages.  If you wish it to reload the same page when the script runs, call yourself in the action= and place a hidden check that lets you know if this page is being loaded or if the form is filled out and submitted.</p>
<p>Put the hidden check if form submitted in the form:</p>
<p>&lt;input type=&#8221;hidden&#8221; name=&#8221;submit_check&#8221; value=&#8221;1&#8243; /&gt;</p>
<p>The check for it in the part of the form you do your calculations:<br />
if ($_POST['submit_check'] == 1 ) { /*do something*/ }</p>
<p>See example: <a href="http://herselfsrecipes.com/calorie-calculator">Calorie calculator</a><br />
Download example: <a href="/files/calories.txt">Calories example php form in a WP blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://herselfswebtools.com/2008/06/how-to-convert-your-old-perl-cgi-scripts-to-work-in-your-blog-using-php.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl script to build blog archives by subject</title>
		<link>http://herselfswebtools.com/2007/09/perl-script-to-build-blog-archives-by-subject.html</link>
		<comments>http://herselfswebtools.com/2007/09/perl-script-to-build-blog-archives-by-subject.html#comments</comments>
		<pubDate>Wed, 12 Sep 2007 11:00:00 +0000</pubDate>
		<dc:creator>Linda MacPhee-Cobb</dc:creator>
				<category><![CDATA[archives]]></category>
		<category><![CDATA[blogger]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://timestocome.org/webtools/2007/09/perl-script-to-build-blog-archives-by-subject.html</guid>
		<description><![CDATA[I found that lots of people were hunting around the TimesToCome Mobile Blog for posts that weren&#8217;t easily findable. You can tell this by looking in your log files. If you see some of your top views are for http://yourblog.com/label/something then people aren&#8217;t finding posts.  Make it easier for them. Add in an archive by [...]]]></description>
			<content:encoded><![CDATA[<p>I found that lots of people were hunting around the <a href="http://timestocomemobile.com">TimesToCome Mobile Blog</a> for posts that weren&#8217;t easily findable.  You can tell this by looking in your log files.  If you see some of your top views are for http://yourblog.com/label/something then people aren&#8217;t finding posts. </p>
<p>Make it easier for them.  Add in an <a href="http://herselfswebtools.com/archives.html">archive by subject post</a> and make it easy to find.</p>
<p>I haven&#8217;t figured out how to fully automate it but in the meantime, I wrote a couple of PERL scripts, one for WordPress and one for Blogger that fetch your RSS feed, pull out the links, sort them by subject and stick them in an HTML file.  You can open the file in any editor and cut and paste it into a post.  You&#8217;ll want to re-run it once a month or so and update your archive post.</p>
<p><a href="/files/blogger_archive.txt">Blogger archive building tool</a><br />
<a href="/files/wordpress_archive.txt">WordPress archive building tool</a></p>
<p>Directions are in each file, it&#8217;s pretty painless.  In WordPress you have to temporarily up your feed count.  In both you just have to switch the temp url to your RSS url feed.</p>
<p>See also:<br />
<a href="http://herselfswebtools.com/2007/07/installing-perl-modules.html">Installing PERL Modules</a></p>
]]></content:encoded>
			<wfw:commentRss>http://herselfswebtools.com/2007/09/perl-script-to-build-blog-archives-by-subject.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PERL script to back up Blogger comments</title>
		<link>http://herselfswebtools.com/2007/08/perl-script-to-back-up-blogger-comments.html</link>
		<comments>http://herselfswebtools.com/2007/08/perl-script-to-back-up-blogger-comments.html#comments</comments>
		<pubDate>Wed, 08 Aug 2007 12:00:00 +0000</pubDate>
		<dc:creator>Linda MacPhee-Cobb</dc:creator>
				<category><![CDATA[blogger]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://timestocome.org/webtools/2007/08/perl-script-to-back-up-blogger-comments.html</guid>
		<description><![CDATA[There are many tools for backing up Blogger blogs to Windows but none I could find for us OSX and Linux users. Here is a PERL script that will fetch your rss comment feed from your blogger blog. It will grab your blogs comments and save them with the same name as on blogger. Comments [...]]]></description>
			<content:encoded><![CDATA[<p>There are many tools for backing up Blogger blogs to Windows but none I could find for us OSX and Linux users.</p>
<p>Here is a PERL script that will fetch your rss comment feed from your blogger blog.  It will grab your blogs comments and save them with the same name as on blogger.  Comments are then stored in a separate directory for each post.Posts and images are not downloaded with this script.</p>
<p><a href="/files/backup-blogger-comments.txt">backup-blogger-comments.pl</a></p>
<p>If you have Perl installed on your computer then down load the script.<br />
Chmod 755 backup-blogger-comments.pl to make it executable<br />
On line 38 change the 999s to your blog&#8217;s blogger id number</p>
<p>Then run the script../backup-blogger-comments.pl</p>
<p>If you have more than 300 comments change the max=300 to a number larger than the number of posts you have posted.</p>
<p>It&#8217;s a very fast script and will have your comments backed up in no time.</p>
<p>If, like me you have numerous blogs write a script to back up all the posts and comments like this:</p>
<p>#!/usr/bin/perl<br />
# perl script to call all back up programs for blogger blogs</p>
<p>print &#8220;\nBacking up AI posts&#8221;;<br />
system ( &#8220;./backupai.pl&#8221; );</p>
<p>print &#8220;\n  Backing up AI comments&#8221;;<br />
system ( &#8220;./backupai-comments.pl&#8221; );</p>
<p>print &#8220;\nBacking up Mobile posts&#8221;;<br />
system ( &#8220;./backupmobile.pl&#8221; );</p>
<p>print &#8220;\n   Backing up Mobile comments&#8221;;<br />
system ( &#8220;./backupmobile-comments.pl&#8221; );</p>
<p>print &#8220;\nBacking up Recipes post&#8221;;<br />
system ( &#8220;./backuprecipes.pl&#8221; );</p>
<p>print &#8220;\n   Backing up Recipe comments&#8221;;<br />
system ( &#8220;./backuprecipes-comments.pl&#8221;);</p>
<p>print &#8220;\nBacking up Garden posts&#8221;;<br />
system ( &#8220;./backupgarden.pl&#8221; );</p>
<p>print &#8220;\n   Backing up Garden comments&#8221;;<br />
system ( &#8221; ./backupgarden-comments.pl&#8221; );</p>
<p>print &#8220;\nBacking up Houseplants posts&#8221;;<br />
system ( &#8220;./backuphouseplants.pl&#8221; );</p>
<p>print &#8220;\n   Backing up Houseplant comments &#8221; ;<br />
system ( &#8220;./backuphouseplants-comments.pl&#8221; );</p>
<p>print &#8220;\nBacking up Webtools posts&#8221;;<br />
system ( &#8220;./backupwebtools.pl&#8221; );</p>
<p>print &#8220;\n   Backing up Webtools comments &#8220;;<br />
system ( &#8220;./backupwebtools-comments.pl &#8221; ); </p>
<p>More information:<br />
<a href="http://www.perl.com/download.csp">Download Perl and help to get you started</a> </p>
<p>You may need to install Perl modules; see <a href="http://herselfswebtools.com/2007/07/installing-perl-modules.html">How to install Perl modules</a> </p>
<p>See also:<br />
<a href="http://herselfswebtools.com/2007/08/perl-script-to-back-up-blogger-posts.html">Perl script to back up Blogger posts and images</a></p>
]]></content:encoded>
			<wfw:commentRss>http://herselfswebtools.com/2007/08/perl-script-to-back-up-blogger-comments.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

