<?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>Onlydot.net</title>
	<atom:link href="http://onlydot.net/cnt/feed/" rel="self" type="application/rss+xml" />
	<link>http://onlydot.net/cnt</link>
	<description>Onlydot is more than just another page in the net</description>
	<lastBuildDate>Mon, 05 Dec 2011 20:36:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Protected: BB Dump Clean Archive</title>
		<link>http://onlydot.net/cnt/2011/12/bb-dump-clean-archive/</link>
		<comments>http://onlydot.net/cnt/2011/12/bb-dump-clean-archive/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 20:50:04 +0000</pubDate>
		<dc:creator>Andres</dc:creator>
				<category><![CDATA[Files/Scripts]]></category>
		<category><![CDATA[blackboard]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://onlydot.net/cnt/?p=665</guid>
		<description><![CDATA[There is no excerpt because this is a protected post.]]></description>
			<content:encoded><![CDATA[<form action="http://onlydot.net/cnt/wp-pass.php" method="post">
<p>This post is password protected. To view it please enter your password below:</p>
<p><label for="pwbox-665">Password:<br />
<input name="post_password" id="pwbox-665" type="password" size="20" /></label><br />
<input type="submit" name="Submit" value="Submit" /></p></form>
]]></content:encoded>
			<wfw:commentRss>http://onlydot.net/cnt/2011/12/bb-dump-clean-archive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Monkey Jazz</title>
		<link>http://onlydot.net/cnt/2011/07/monkey-jazz/</link>
		<comments>http://onlydot.net/cnt/2011/07/monkey-jazz/#comments</comments>
		<pubDate>Tue, 12 Jul 2011 18:12:12 +0000</pubDate>
		<dc:creator>Andres</dc:creator>
				<category><![CDATA[Mini-blog]]></category>
		<category><![CDATA[Videos]]></category>

		<guid isPermaLink="false">http://onlydot.net/cnt/?p=635</guid>
		<description><![CDATA[<p>[There is a video that cannot be displayed in this feed. <a href="http://onlydot.net/cnt/2011/07/monkey-jazz/">Visit the blog entry to see the video.]</a><br />
<span id="more-635"></span>&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>[There is a video that cannot be displayed in this feed. <a href="http://onlydot.net/cnt/2011/07/monkey-jazz/">Visit the blog entry to see the video.]</a><br />
<span id="more-635"></span></p>
]]></content:encoded>
			<wfw:commentRss>http://onlydot.net/cnt/2011/07/monkey-jazz/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adios</title>
		<link>http://onlydot.net/cnt/2011/06/adios/</link>
		<comments>http://onlydot.net/cnt/2011/06/adios/#comments</comments>
		<pubDate>Fri, 17 Jun 2011 19:40:45 +0000</pubDate>
		<dc:creator>Andres</dc:creator>
				<category><![CDATA[Mini-blog]]></category>
		<category><![CDATA[Videos]]></category>

		<guid isPermaLink="false">http://onlydot.net/cnt/?p=631</guid>
		<description><![CDATA[[There is a video that cannot be displayed in this feed. <a href="http://onlydot.net/cnt/2011/06/adios/">Visit the blog entry to see the video.]&#8230;</a>]]></description>
			<content:encoded><![CDATA[[There is a video that cannot be displayed in this feed. <a href="http://onlydot.net/cnt/2011/06/adios/">Visit the blog entry to see the video.]</a>
]]></content:encoded>
			<wfw:commentRss>http://onlydot.net/cnt/2011/06/adios/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RSS Parser Email Script 2</title>
		<link>http://onlydot.net/cnt/2011/06/rss-parser-email-script-2/</link>
		<comments>http://onlydot.net/cnt/2011/06/rss-parser-email-script-2/#comments</comments>
		<pubDate>Thu, 16 Jun 2011 15:10:19 +0000</pubDate>
		<dc:creator>Andres</dc:creator>
				<category><![CDATA[Files/Scripts]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[email rss]]></category>
		<category><![CDATA[parser]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[RSS parse email]]></category>

		<guid isPermaLink="false">http://onlydot.net/cnt/?p=627</guid>
		<description><![CDATA[<p>The following file is a perl script that reads RSS URLs and notifies of new items via email. This is an upgrade from an earlier php script.</p>
<p>Please note some CPAN modules are required:<br />
<strong><br />
XML::Simple<br />
Data::Dumper<br />
Net::SMTP<br />
LWP<br />
URI<br />
</strong></p>
<div class="codecolorer-container perl blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span></div>&#8230;</div>]]></description>
			<content:encoded><![CDATA[<p>The following file is a perl script that reads RSS URLs and notifies of new items via email. This is an upgrade from an earlier php script.</p>
<p>Please note some CPAN modules are required:<br />
<strong><br />
XML::Simple<br />
Data::Dumper<br />
Net::SMTP<br />
LWP<br />
URI<br />
</strong></p>
<div class="codecolorer-container perl blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/usr/bin/perl</span><br />
<br />
<span style="color: #666666; font-style: italic;">##################################</span><br />
<span style="color: #666666; font-style: italic;"># Andres &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #</span><br />
<span style="color: #666666; font-style: italic;"># afelotreyu @ gmail . com &nbsp; &nbsp; &nbsp; #</span><br />
<span style="color: #666666; font-style: italic;"># Date: &nbsp; &nbsp; &nbsp; &nbsp;June &nbsp;20 &nbsp;2011 &nbsp; &nbsp;#</span><br />
<span style="color: #666666; font-style: italic;">##################################</span><br />
<span style="color: #666666; font-style: italic;">#</span><br />
<span style="color: #666666; font-style: italic;"># This perl Script reads RSS URLS and emails its contents to a given address. </span><br />
<span style="color: #666666; font-style: italic;"># The RSS urls must be in a file see below.</span><br />
<span style="color: #666666; font-style: italic;"># ########### Log Format</span><br />
<span style="color: #666666; font-style: italic;"># Please note the 'rss_log' file must have the following format</span><br />
<span style="color: #666666; font-style: italic;"># URL|||title</span><br />
<span style="color: #666666; font-style: italic;"># http://file.xml|||title</span><br />
<span style="color: #666666; font-style: italic;"># http://file.xml</span><br />
<br />
<span style="color: #000000; font-weight: bold;">use</span> vars <span style="color: #009966; font-style: italic;">qw/ $REVISION $VERSION /</span><span style="color: #339933;">;</span><br />
<span style="color: #0000ff;">$REVISION</span><span style="color: #339933;">=</span><span style="color: #ff0000;">'0.01'</span><span style="color: #339933;">;</span><br />
<span style="color: #0000ff;">$VERSION</span><span style="color: #339933;">=</span><span style="color: #ff0000;">&quot;1.0 (Build $REVISION)&quot;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Use CPAN modules</span><br />
<span style="color: #000000; font-weight: bold;">use</span> strict<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> XML<span style="color: #339933;">::</span><span style="color: #006600;">Simple</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> Data<span style="color: #339933;">::</span><span style="color: #006600;">Dumper</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> CGI<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> LWP<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> URI<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> Net<span style="color: #339933;">::</span><span style="color: #006600;">SMTP</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$cgi</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> CGI<span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$browser</span> <span style="color: #339933;">=</span> LWP<span style="color: #339933;">::</span><span style="color: #006600;">UserAgent</span><span style="color: #339933;">-&gt;</span><span style="color: #000000; font-weight: bold;">new</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">########################</span><br />
<span style="color: #666666; font-style: italic;"># Configuration</span><br />
<span style="color: #666666; font-style: italic;"># please modify carefully as needed</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">%configval</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><br />
&nbsp; <span style="color: #ff0000;">'rss_log'</span> &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'somelog.txt'</span><span style="color: #339933;">,</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;"># File where to find RSS list and log it</span><br />
&nbsp; <span style="color: #ff0000;">'tmp_xml_file'</span> &nbsp; &nbsp;<span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'sometimefile.xml'</span><span style="color: #339933;">,</span><br />
&nbsp; <span style="color: #ff0000;">'subject_email'</span> &nbsp; &nbsp;<span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'RSS Parse email'</span><span style="color: #339933;">,</span><br />
&nbsp; <span style="color: #ff0000;">'email_method'</span> &nbsp; &nbsp;<span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'sendmail'</span><span style="color: #339933;">,</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;"># sendmail or smtp</span><br />
&nbsp; <span style="color: #ff0000;">'email_to'</span> &nbsp; &nbsp; &nbsp;<span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'some_user@somedomain.com'</span><span style="color: #339933;">,</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;"># To - Email Address(es)</span><br />
&nbsp; <span style="color: #ff0000;">'email_from'</span> &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'some_user@somedomain.com'</span><span style="color: #339933;">,</span> &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;"># From - email address</span><br />
&nbsp; <span style="color: #ff0000;">'sendmail'</span> &nbsp; &nbsp; &nbsp;<span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'/usr/sbin/sendmail -t'</span><span style="color: #339933;">,</span> &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Sendmail Location and params</span><br />
&nbsp; <span style="color: #ff0000;">'smtp_server'</span> &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'somedomain.local'</span><span style="color: #339933;">,</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;"># This is the SMTP</span><br />
&nbsp; <span style="color: #ff0000;">'smtp_timeout'</span> &nbsp; &nbsp;<span style="color: #339933;">=&gt;</span> <span style="color: #ff0000;">'30'</span><span style="color: #339933;">,</span><br />
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">########################</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Important Variables</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$data</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$source</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$content</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$new</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;"># New items = no!</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$send</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Send Email = no!</span><br />
<span style="color: #666666; font-style: italic;"># Temporal variables that we use over the script</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$tmp</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$a</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$e</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$line</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$link</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$last</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">########################</span><br />
<span style="color: #666666; font-style: italic;"># Lest get started</span><br />
<span style="color: #666666; font-style: italic;"># First we read the log file</span><br />
<span style="color: #0000ff;">$source</span> <span style="color: #339933;">=</span> ReadLOG_file<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;"># $content builds the email message</span><br />
<span style="color: #0000ff;">$content</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;RSS Parse Email Listing<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;"># Be nice, print some output for html</span><br />
<a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> <span style="color: #0000ff;">$cgi</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">header</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'text/html'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Loop over every RSS link</span><br />
<span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$a</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><span style="color: #0000ff;">$a</span> <span style="color: #339933;">&lt;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$#</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">$source</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$a</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$last</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$content</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;RSS-&gt;[$a]: <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Download the File of the RSS</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&amp;DownloadXML_file</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$source</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$a</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Read the file</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$data</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&amp;ReadXML_file</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$configval</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'tmp_xml_file'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Check if there are any items defined</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$data</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>channel<span style="color: #009900;">&#125;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>item<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># We have items, lets chech output</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><a href="http://perldoc.perl.org/functions/ref.html"><span style="color: #000066;">ref</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$data</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>channel<span style="color: #009900;">&#125;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>item<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">eq</span> <span style="color: #ff0000;">'ARRAY'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">foreach</span> <span style="color: #0000ff;">$e</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">@</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">$data</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>channel<span style="color: #009900;">&#125;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>item<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># OK we are in, now we store all posts since last one</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$e-&gt;{title}&quot;</span> <span style="color: #b1b100;">eq</span> <span style="color: #ff0000;">&quot;$source-&gt;[$a]-&gt;[1]&quot;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$content</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Last Item: $source-&gt;[$a]-&gt;[1] <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">last</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># New Item, we need to store it!</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$new</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$new</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$last</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$source</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$a</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$e</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>title<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$last</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$send</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> &nbsp; &nbsp;<span style="color: #666666; font-style: italic;"># Send Email</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$content</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Title: $e-&gt;{title} <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$content</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;Link: $e-&gt;{link} <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$content</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;Description: $e-&gt;{description} <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$content</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;Date: $e-&gt;{pubDate} <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Only one item, is it the same as log?</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$data-&gt;{channel}-&gt;{item}-&gt;{title}&quot;</span> <span style="color: #b1b100;">eq</span> <span style="color: #ff0000;">&quot;$source-&gt;[$a]-&gt;[1]&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Same item as before</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$content</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>Last Item: $source-&gt;[$a]-&gt;[1] <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;"># New Item</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># New Item, we need to store it!</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$new</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$new</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$last</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">0</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$source</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$a</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$data</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>channel<span style="color: #009900;">&#125;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>item<span style="color: #009900;">&#125;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#123;</span>title<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$last</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$send</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> &nbsp; &nbsp;<span style="color: #666666; font-style: italic;"># Send Email</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$content</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;title: $data-&gt;{channel}-&gt;{item}-&gt;{title} <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$content</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;Link: $data-&gt;{channel}-&gt;{item}-&gt;{link} <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$content</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;Description: $data-&gt;{channel}-&gt;{item}-&gt;{description} <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$content</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;Date: $data-&gt;{channel}-&gt;{item}-&gt;{pubDate} <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;"># No items, maybe empty?</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$content</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;RSS Feed is currently Empty - <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Next RSS!</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$content</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$content</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>_____________________________________<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># A new item was set, update log file</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$new</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/open.html"><span style="color: #000066;">open</span></a> <span style="color: #009900;">&#40;</span>NEWLOG<span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$configval</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'rss_log'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #009900;">&#40;</span><a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;$configval{'rss_log'} - File could not open to write $!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Loop over every RSS link</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$a</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><span style="color: #0000ff;">$a</span> <span style="color: #339933;">&lt;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$#</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">$source</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$a</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$source</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$a</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> NEWLOG <span style="color: #0000ff;">$source</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$a</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #ff0000;">'|||'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$source</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$a</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> NEWLOG <span style="color: #0000ff;">$source</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$a</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #ff0000;">'|||'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$source</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$a</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/close.html"><span style="color: #000066;">close</span></a> NEWLOG<span style="color: #339933;">;</span><br />
<br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #666666; font-style: italic;"># Do we need to email?</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$send</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&amp;SendMail</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$configval</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'subject_email'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$content</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #666666; font-style: italic;"># Print something for HTML access</span><br />
<a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;&lt;html&gt;&lt;body&gt;&lt;h1&gt;Finished&lt;/h1&gt;&lt;h1&gt;&lt;body&gt;&lt;/body&gt;&lt;/h1&gt;&lt;/body&gt;&lt;/html&gt;&quot;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;">########################</span><br />
<span style="color: #666666; font-style: italic;"># Subroutines go here</span><br />
<span style="color: #666666; font-style: italic;">########################</span><br />
<span style="color: #666666; font-style: italic;"># ReadXML_file</span><br />
<span style="color: #666666; font-style: italic;"># Needs to get a file location to read its contents</span><br />
<span style="color: #666666; font-style: italic;"># It returns a dereference hash ref</span><br />
<span style="color: #666666; font-style: italic;">########################</span><br />
<span style="color: #000000; font-weight: bold;">sub</span> ReadXML_file<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$file</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Read the XML file</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$xml</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> XML<span style="color: #339933;">::</span><span style="color: #006600;">Simple</span> <span style="color: #009900;">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; KeyAttr &nbsp; &nbsp; &nbsp; <span style="color: #339933;">=&gt;</span> <span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SuppressEmpty <span style="color: #339933;">=&gt;</span> <a href="http://perldoc.perl.org/functions/undef.html"><span style="color: #000066;">undef</span></a><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># read XML file</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$data</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$xml</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">XMLin</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/return.html"><span style="color: #000066;">return</span></a> <span style="color: #0000ff;">$data</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">##### Sample code!</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Use of the XML::Simple output!</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># dereference hash ref</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># access &lt;employee&gt; array</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">#foreach $e (@{$data-&gt;{data}-&gt;{robots}-&gt;{robot}})</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">#{</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">#print $e-&gt;{name}, &quot;\n&quot;;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">#print &quot;Age/Sex: &quot;, $e-&gt;{id}, &quot;/&quot;, &nbsp;$e-&gt;{icon}, &quot;\n&quot;; </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">#print &quot;Department: &quot;, $e-&gt;{url_company}, &quot;\n&quot;; </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">#print &quot;\n&quot;;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">#}</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #666666; font-style: italic;">########################</span><br />
<span style="color: #666666; font-style: italic;"># ReadLOG_file</span><br />
<span style="color: #666666; font-style: italic;">########################</span><br />
<span style="color: #000000; font-weight: bold;">sub</span> ReadLOG_file<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/open.html"><span style="color: #000066;">open</span></a> <span style="color: #009900;">&#40;</span>READLOG<span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;&lt; &quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$configval</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'rss_log'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #ff0000;">&quot;File $configval{'rss_log'} could not open $! <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/flock.html"><span style="color: #000066;">flock</span></a> <span style="color: #009900;">&#40;</span>READLOG<span style="color: #339933;">,</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/seek.html"><span style="color: #000066;">seek</span></a><span style="color: #009900;">&#40;</span>READLOG<span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$e</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">foreach</span> <span style="color: #0000ff;">$line</span> <span style="color: #009900;">&#40;</span><span style="color: #009999;">&lt;READLOG&gt;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/chomp.html"><span style="color: #000066;">chomp</span></a> <span style="color: #0000ff;">$line</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">m/^http/</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">@pair</span> <span style="color: #339933;">=</span> <a href="http://perldoc.perl.org/functions/split.html"><span style="color: #000066;">split</span></a><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/\|\|\|/</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$line</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$source</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$e</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$pair</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$source</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$e</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&gt;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$pair</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$e</span><span style="color: #339933;">++;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/close.html"><span style="color: #000066;">close</span></a> READLOG<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/return.html"><span style="color: #000066;">return</span></a> <span style="color: #0000ff;">$source</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #666666; font-style: italic;">########################</span><br />
<span style="color: #666666; font-style: italic;"># DownloadXML_file</span><br />
<span style="color: #666666; font-style: italic;"># needs a URL to connect to and download the XML file.</span><br />
<span style="color: #666666; font-style: italic;">########################</span><br />
<span style="color: #000000; font-weight: bold;">sub</span> DownloadXML_file<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Download XML</span><br />
&nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># We are going to connect to the page and download the XML file</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$url</span> <span style="color: #339933;">=</span> URI<span style="color: #339933;">-&gt;</span><span style="color: #000000; font-weight: bold;">new</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #0000ff;">$url</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">query_form</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$mfilecont</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$browser</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #0000ff;">$tmp</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$configval</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'tmp_xml_file'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/open.html"><span style="color: #000066;">open</span></a> <span style="color: #009900;">&#40;</span>TEMPORAL<span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;&gt;&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$tmp</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #009900;">&#40;</span><a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;$tmp - File could not open $!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> TEMPORAL <span style="color: #0000ff;">$mfilecont</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">content</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/close.html"><span style="color: #000066;">close</span></a> TEMPORAL<span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Return a success signal '</span><br />
&nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/return.html"><span style="color: #000066;">return</span></a> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #666666; font-style: italic;">########################</span><br />
<span style="color: #666666; font-style: italic;"># SendMail(subject,message);</span><br />
<span style="color: #666666; font-style: italic;"># Needs Subject and Message content</span><br />
<span style="color: #666666; font-style: italic;"># Uses SMTP configuration</span><br />
<span style="color: #666666; font-style: italic;">########################</span><br />
<span style="color: #000000; font-weight: bold;">sub</span> SendMail<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$subject</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$message</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$_</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">#### Email </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Here is where the email is created</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$configval</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'email_method'</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/^smtp$/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$smtp</span> <span style="color: #339933;">=</span> Net<span style="color: #339933;">::</span><span style="color: #006600;">SMTP</span><span style="color: #339933;">-&gt;</span><span style="color: #000000; font-weight: bold;">new</span><span style="color: #009900;">&#40;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$configval</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'smtp_server'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #666666; font-style: italic;"># MailHost</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Timeout <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">$configval</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'smtp_timeout'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span> &nbsp; &nbsp;<span style="color: #666666; font-style: italic;"># TimeOut</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$smtp</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">mail</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$configval{'email_from'}&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #009900;">&#40;</span> &nbsp;<a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;From_email call bad $! <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Address Email is created from (Check if exist)</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$smtp</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">to</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$configval{'email_to'}&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">||</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #009900;">&#40;</span> <a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;To email call bad $! <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># Address Email is going to (Check if exist)</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$smtp</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">data</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$smtp</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">datasend</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;To: $configval{'email_to'} <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># Address Email is going to</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$smtp</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">datasend</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;Subject: $subject <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># Subject</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$smtp</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">datasend</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$smtp</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">datasend</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;$message&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$smtp</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">dataend</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$smtp</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">quit</span><span style="color: #339933;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/^sendmail$/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/open.html"><span style="color: #000066;">open</span></a><span style="color: #009900;">&#40;</span>SENDMAIL<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;| $configval{'sendmail'} &quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #ff0000;">&quot;Cannot open $configval{'sendmail'}: $!&quot;</span><span style="color: #339933;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> SENDMAIL <span style="color: #ff0000;">&quot;Reply-to: &quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$configval</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'email_from'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> SENDMAIL <span style="color: #ff0000;">&quot;Subject: &quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$subject</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> SENDMAIL <span style="color: #ff0000;">&quot;To: &quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$configval</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'email_to'</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> SENDMAIL <span style="color: #ff0000;">&quot;Content-type: text/plain<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> SENDMAIL <span style="color: #0000ff;">$message</span><span style="color: #339933;">.</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> SENDMAIL <span style="color: #ff0000;">'.'</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/close.html"><span style="color: #000066;">close</span></a><span style="color: #009900;">&#40;</span>SENDMAIL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">#### Done Email</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #666666; font-style: italic;">########################</span><br />
<br />
<span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">__END__</span></div></div>
<p></employee></p>
]]></content:encoded>
			<wfw:commentRss>http://onlydot.net/cnt/2011/06/rss-parser-email-script-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Poetry is about truth</title>
		<link>http://onlydot.net/cnt/2011/05/poetry-is-about-truth/</link>
		<comments>http://onlydot.net/cnt/2011/05/poetry-is-about-truth/#comments</comments>
		<pubDate>Fri, 13 May 2011 15:27:54 +0000</pubDate>
		<dc:creator>Andres</dc:creator>
				<category><![CDATA[Mini-blog]]></category>
		<category><![CDATA[Videos]]></category>

		<guid isPermaLink="false">http://onlydot.net/cnt/?p=612</guid>
		<description><![CDATA[[There is a video that cannot be displayed in this feed. <a href="http://onlydot.net/cnt/2011/05/poetry-is-about-truth/">Visit the blog entry to see the video.]</a>
<p>Here is a link to the words of this great poem<br />
<a href="http://www.amiribaraka.com/blew.html">http://www.amiribaraka.com/blew.html</a>&#8230;</p>]]></description>
			<content:encoded><![CDATA[[There is a video that cannot be displayed in this feed. <a href="http://onlydot.net/cnt/2011/05/poetry-is-about-truth/">Visit the blog entry to see the video.]</a>
<p>Here is a link to the words of this great poem<br />
<a href="http://www.amiribaraka.com/blew.html">http://www.amiribaraka.com/blew.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://onlydot.net/cnt/2011/05/poetry-is-about-truth/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internet Stats for 2010</title>
		<link>http://onlydot.net/cnt/2011/04/internet-stats-for-2010/</link>
		<comments>http://onlydot.net/cnt/2011/04/internet-stats-for-2010/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 17:53:10 +0000</pubDate>
		<dc:creator>Andres</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Servers]]></category>

		<guid isPermaLink="false">http://onlydot.net/cnt/?p=601</guid>
		<description><![CDATA[<p>So I came across this page and found some very interesting information:</p>
<ul><strong>Emails</strong>
<li>107 trillion – The number of emails sent on the Internet in 2010.</li>
<li>294 billion – Average number of email messages per day.</li>
</ul>
<ul><strong>Websites</strong>
<li>255 million – </li>&#8230;</ul>]]></description>
			<content:encoded><![CDATA[<p>So I came across this page and found some very interesting information:</p>
<ul><strong>Emails</strong></p>
<li>107 trillion – The number of emails sent on the Internet in 2010.</li>
<li>294 billion – Average number of email messages per day.</li>
</ul>
<ul><strong>Websites</strong></p>
<li>255 million – The number of websites as of December 2010.</li>
</ul>
<ul><strong>Web servers</strong></p>
<li>39.1% – Growth in the number of Apache websites in 2010.</li>
<li>15.3% – Growth in the number of IIS websites in 2010.</li>
<li>55.7% – Growth in the number of Lighttpd websites in 2010.</li>
</ul>
<p>Check out the entire article and stats at: <a href="http://royal.pingdom.com/2011/01/12/internet-2010-in-numbers/">http://royal.pingdom.com/2011/01/12/internet-2010-in-numbers/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://onlydot.net/cnt/2011/04/internet-stats-for-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quebec 2011 &#8211; Le Massif / Mont Saint-Anne</title>
		<link>http://onlydot.net/cnt/2011/03/quebec-2011-le-massif-mont-saint-anne/</link>
		<comments>http://onlydot.net/cnt/2011/03/quebec-2011-le-massif-mont-saint-anne/#comments</comments>
		<pubDate>Wed, 16 Mar 2011 03:34:21 +0000</pubDate>
		<dc:creator>Andres</dc:creator>
				<category><![CDATA[Photos]]></category>
		<category><![CDATA[Videos]]></category>
		<category><![CDATA[le massif]]></category>
		<category><![CDATA[snow]]></category>
		<category><![CDATA[snowboarding]]></category>
		<category><![CDATA[winter]]></category>

		<guid isPermaLink="false">http://onlydot.net/cnt/?p=593</guid>
		<description><![CDATA[<p>Two ski resorts one weekend, here is the compilation of videos and photos.</p>
[There is a video that cannot be displayed in this feed. <a href="http://onlydot.net/cnt/2011/03/quebec-2011-le-massif-mont-saint-anne/">Visit the blog entry to see the video.]&#8230;</a>]]></description>
			<content:encoded><![CDATA[<p>Two ski resorts one weekend, here is the compilation of videos and photos.</p>
[There is a video that cannot be displayed in this feed. <a href="http://onlydot.net/cnt/2011/03/quebec-2011-le-massif-mont-saint-anne/">Visit the blog entry to see the video.]</a>
]]></content:encoded>
			<wfw:commentRss>http://onlydot.net/cnt/2011/03/quebec-2011-le-massif-mont-saint-anne/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Just say yes _ Ken Andrews</title>
		<link>http://onlydot.net/cnt/2011/01/just-say-yes-_-ken-andrews/</link>
		<comments>http://onlydot.net/cnt/2011/01/just-say-yes-_-ken-andrews/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 23:51:28 +0000</pubDate>
		<dc:creator>Andres</dc:creator>
				<category><![CDATA[Songs]]></category>

		<guid isPermaLink="false">http://onlydot.net/cnt/?p=546</guid>
		<description><![CDATA[<p>I don&#8217;t know which way I should turn<br />
I&#8217;m too afraid of getting burned<br />
When all the wells have come up dry<br />
It&#8217;s hard to take another try</p>
<p>But I pick myself up of the floor<br />
And tried my best &#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know which way I should turn<br />
I&#8217;m too afraid of getting burned<br />
When all the wells have come up dry<br />
It&#8217;s hard to take another try</p>
<p>But I pick myself up of the floor<br />
And tried my best just like I did before<br />
Just say yes&#8230; just say yes</p>
<p>Everytime I take a chance<br />
This hesitation pulls me back<br />
From finding out who I should be<br />
I want to know the real me</p>
<p>So I pick myself up off the floor<br />
And realized just who I was before<br />
I can&#8217;t listen to the voice inside that keeps on saying I should never try<br />
Just say yes<br />
Just say yes</p>
<p>I don&#8217;t know which way I should go<br />
I&#8217;m too afraid of letting go<br />
With all this doubt to overcome<br />
It&#8217;s hard to see all that I&#8217;ve done</p>
<p>But I pick myself up off the floor<br />
And tried my best just like I did before<br />
I just set aside the fear within and walk on through the door that held me in<br />
Just say yes<br />
Just say yes</p>
<div id="gsWidget"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="250" height="40" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="window" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="hostname=cowbell.grooveshark.com&amp;songID=28504827&amp;style=undefined" /><param name="src" value="http://listen.grooveshark.com/songWidget.swf" /><embed type="application/x-shockwave-flash" width="250" height="40" src="http://listen.grooveshark.com/songWidget.swf" flashvars="hostname=cowbell.grooveshark.com&amp;songID=28504827&amp;style=undefined" allowscriptaccess="always" wmode="window"></embed></object></div>
]]></content:encoded>
			<wfw:commentRss>http://onlydot.net/cnt/2011/01/just-say-yes-_-ken-andrews/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Life</title>
		<link>http://onlydot.net/cnt/2011/01/life/</link>
		<comments>http://onlydot.net/cnt/2011/01/life/#comments</comments>
		<pubDate>Sun, 02 Jan 2011 06:51:55 +0000</pubDate>
		<dc:creator>Andres</dc:creator>
				<category><![CDATA[Andres Space]]></category>

		<guid isPermaLink="false">http://onlydot.net/cnt/?p=539</guid>
		<description><![CDATA[<p id="internal-source-marker_0.4029639023444631">A  song without words, nature giving the path to another insight.  Desperation of life turns in my words, receptive to suffocate the spirit  of this mind, expressions of the heart, satisfaction to the soul.</p>
<p>It  seemed confusing at first, but &#8230;</p>]]></description>
			<content:encoded><![CDATA[<p id="internal-source-marker_0.4029639023444631">A  song without words, nature giving the path to another insight.  Desperation of life turns in my words, receptive to suffocate the spirit  of this mind, expressions of the heart, satisfaction to the soul.</p>
<p>It  seemed confusing at first, but when the lights began to flash the  corner of my eyes, it was my soul I found, speaking to me from a song  with no words. Cherry Hill begins the revelation of my life. Memories,  smiles, and friends, come to mind across my eyes. Heroic moments where  the only hero is the heart that gives us the strength to live this  incomprehensive life, capturing my mind while I move across my path. The  root of this path did not start tonight, but years ago, when tears of  joy displayed the start. Roots of bass and gentle notes to the ears of  my heart, grow with every second of this beat, until they are on their  own scale in a melody. And so, they become an Acoustic Alchemy into the  expression of a living song: “<em>Whenever we doubt our own path, or lose  sight of the process, we must remember what we are evolving toward, what  the process of living is all about. Reaching heaven on Earth is why we  are here. And now we know how it can be done…how it will be done.</em>”  (Celestine Prophecy)</p>
<p>As  the path where we walk becomes a usual melody, our eyes see the truth  of life, the meaning of this quest we call life. So questions are asked,  speculations are made, but no truth is yet discovered. Why do we bring  our youth to what they are today? How is it that we enjoy the  deformation of our must powerful hero; our heart?. Submerged in alcohol  and lies of what we just don’t want to see or confront anymore. A joyful  truth that enlightens our selves and the surroundings of this world, a  hero that hides under the influence of handmade poisons and destruction.</p>
<p>Left  by our side, our only companion looks for the explanation of these  hidden notes that uncover the secrets of life. Smaller and bigger with  every passing light, he  is the only one that has been there all the  time. With you since the beginning, since the bass first beat, you find  that we are not alone in this walk. Our every move is watch and judge,  or mistakes are seen by this romantic union, but yet our lies hide under  the shadows created by the eyes of this silent hero. With a pure  expression of acceptance for who we are, our hero walks with us through a  beautiful song with no words:</p>
<p>“<em>If A. can probe, however conclusively, that he may, of right, enslave  B. –why may not B. snatch the same argument, and prove equally, that he  may enslave A?- You say A. is white, and B. is black. It is color,  then; the lighter, having the right to enslave the darker? Take care.  By this rule, you are to be slave first man you meet, with a fairer skin  than your own.</em>” (July 1, 1854, Abraham Lincoln)</p>
<p>No  material thing can break this union, a heroic combination of soul and  life, roots are born within. Even in the darkest moments of life, our  fellow companion is there to support us, to give the strength to walk  this path, where each decision made counts towards a new step. Yet when  our blood stops, our companion joins the darkness of those that matter  in life, and touches the hero within them, to remind them that no  alcohol or poison can ever forget the great steps taken by their side  throughout this unforgiven life.</p>
<p>“Don’t  forget whose path you walk” and don’t forget that the only heroes in  life hide within our shoes, each of these heroes know their path well,  and no poison or substance can ever hide it. Darkness will enlighten the  hero and the bass beat that walks each step of this song with no words.</p>
<p>A. Q. (thank you mother)</p>
<div id="gsWidget"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="250" height="40" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="window" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="hostname=cowbell.grooveshark.com&amp;songID=24274642&amp;style=undefined" /><param name="src" value="http://listen.grooveshark.com/songWidget.swf" /><embed type="application/x-shockwave-flash" width="250" height="40" src="http://listen.grooveshark.com/songWidget.swf" flashvars="hostname=cowbell.grooveshark.com&amp;songID=24274642&amp;style=undefined" allowscriptaccess="always" wmode="window"></embed></object></div>
<div>
<p><em>Written: &#8220;May 25, 2006&#8243;</em></p>
<p><em>Edited: &#8220;Dec 16, 2010&#8243;</em></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://onlydot.net/cnt/2011/01/life/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Soledad</title>
		<link>http://onlydot.net/cnt/2010/12/soledad/</link>
		<comments>http://onlydot.net/cnt/2010/12/soledad/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 17:49:03 +0000</pubDate>
		<dc:creator>Andres</dc:creator>
				<category><![CDATA[Songs]]></category>
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://onlydot.net/cnt/?p=534</guid>
		<description><![CDATA[<p>Some times we just have no words to explain.</p>
<div id="gsWidget"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="250" height="40" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="window" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="hostname=cowbell.grooveshark.com&#38;songID=1717714&#38;style=undefined" /><param name="src" value="http://listen.grooveshark.com/songWidget.swf" /><embed type="application/x-shockwave-flash" width="250" height="40" src="http://listen.grooveshark.com/songWidget.swf" flashvars="hostname=cowbell.grooveshark.com&#38;songID=1717714&#38;style=undefined" allowscriptaccess="always" wmode="window"></embed></object><span id="more-534"></span>&#8230;</div>]]></description>
			<content:encoded><![CDATA[<p>Some times we just have no words to explain.</p>
<div id="gsWidget"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="250" height="40" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="window" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="hostname=cowbell.grooveshark.com&amp;songID=1717714&amp;style=undefined" /><param name="src" value="http://listen.grooveshark.com/songWidget.swf" /><embed type="application/x-shockwave-flash" width="250" height="40" src="http://listen.grooveshark.com/songWidget.swf" flashvars="hostname=cowbell.grooveshark.com&amp;songID=1717714&amp;style=undefined" allowscriptaccess="always" wmode="window"></embed></object><span id="more-534"></span></div>
]]></content:encoded>
			<wfw:commentRss>http://onlydot.net/cnt/2010/12/soledad/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Wish &#8211; Rascal Flatts</title>
		<link>http://onlydot.net/cnt/2010/11/my-wish-rascal-flatts/</link>
		<comments>http://onlydot.net/cnt/2010/11/my-wish-rascal-flatts/#comments</comments>
		<pubDate>Fri, 26 Nov 2010 19:43:20 +0000</pubDate>
		<dc:creator>Andres</dc:creator>
				<category><![CDATA[Songs]]></category>
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://onlydot.net/cnt/?p=528</guid>
		<description><![CDATA[<p>not really my type of music, but this song has great lyrics and its means more than anyone could ever know <img src='http://onlydot.net/cnt/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div id='gsWidget'><object width='250' height='40'><param name='movie' value='http://listen.grooveshark.com/songWidget.swf'></param><param name='wmode' value='window'></param><param name='allowScriptAccess' value='always'></param><param name='flashvars' value='hostname=cowbell.grooveshark.com&#38;songID=7996170&#38;style=undefined'></param><embed src='http://listen.grooveshark.com/songWidget.swf' type='application/x-shockwave-flash' width='250' height='40' flashvars='hostname=cowbell.grooveshark.com&#38;songID=7996170&#38;style=undefined' allowScriptAccess='always' wmode='window'></embed></object>&#8230;</div>]]></description>
			<content:encoded><![CDATA[<p>not really my type of music, but this song has great lyrics and its means more than anyone could ever know <img src='http://onlydot.net/cnt/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div id='gsWidget'><object width='250' height='40'><param name='movie' value='http://listen.grooveshark.com/songWidget.swf'></param><param name='wmode' value='window'></param><param name='allowScriptAccess' value='always'></param><param name='flashvars' value='hostname=cowbell.grooveshark.com&amp;songID=7996170&amp;style=undefined'></param><embed src='http://listen.grooveshark.com/songWidget.swf' type='application/x-shockwave-flash' width='250' height='40' flashvars='hostname=cowbell.grooveshark.com&amp;songID=7996170&amp;style=undefined' allowScriptAccess='always' wmode='window'></embed></object></div></p>
]]></content:encoded>
			<wfw:commentRss>http://onlydot.net/cnt/2010/11/my-wish-rascal-flatts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Good So Far</title>
		<link>http://onlydot.net/cnt/2010/11/good-so-far/</link>
		<comments>http://onlydot.net/cnt/2010/11/good-so-far/#comments</comments>
		<pubDate>Fri, 19 Nov 2010 04:29:36 +0000</pubDate>
		<dc:creator>Andres</dc:creator>
				<category><![CDATA[Songs]]></category>
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://onlydot.net/cnt/?p=521</guid>
		<description><![CDATA[<p>Great Song Produced by Mackintosh Braun</p>
<div id="gsWidget"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="250" height="40" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="window" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="hostname=cowbell.grooveshark.com&#38;songID=24634966&#38;style=undefined" /><param name="src" value="http://listen.grooveshark.com/songWidget.swf" /><embed type="application/x-shockwave-flash" width="250" height="40" src="http://listen.grooveshark.com/songWidget.swf" flashvars="hostname=cowbell.grooveshark.com&#38;songID=24634966&#38;style=undefined" allowscriptaccess="always" wmode="window"></embed></object>&#8230;</div>]]></description>
			<content:encoded><![CDATA[<p>Great Song Produced by Mackintosh Braun</p>
<div id="gsWidget"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="250" height="40" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="window" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="hostname=cowbell.grooveshark.com&amp;songID=24634966&amp;style=undefined" /><param name="src" value="http://listen.grooveshark.com/songWidget.swf" /><embed type="application/x-shockwave-flash" width="250" height="40" src="http://listen.grooveshark.com/songWidget.swf" flashvars="hostname=cowbell.grooveshark.com&amp;songID=24634966&amp;style=undefined" allowscriptaccess="always" wmode="window"></embed></object></div>
]]></content:encoded>
			<wfw:commentRss>http://onlydot.net/cnt/2010/11/good-so-far/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Giving Up, Giving In</title>
		<link>http://onlydot.net/cnt/2010/11/giving-up-giving-in/</link>
		<comments>http://onlydot.net/cnt/2010/11/giving-up-giving-in/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 14:55:45 +0000</pubDate>
		<dc:creator>Andres</dc:creator>
				<category><![CDATA[Songs]]></category>
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://onlydot.net/cnt/?p=514</guid>
		<description><![CDATA[<p>A bit of a head rush <img src='http://onlydot.net/cnt/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div id="gsWidget"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="250" height="40" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="window" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="hostname=cowbell.grooveshark.com&#38;songID=7446723&#38;style=undefined" /><param name="src" value="http://listen.grooveshark.com/songWidget.swf" /><embed type="application/x-shockwave-flash" width="250" height="40" src="http://listen.grooveshark.com/songWidget.swf" flashvars="hostname=cowbell.grooveshark.com&#38;songID=7446723&#38;style=undefined" allowscriptaccess="always" wmode="window"></embed></object></div>
<div><span id="more-514"></span>&#8230;</div>]]></description>
			<content:encoded><![CDATA[<p>A bit of a head rush <img src='http://onlydot.net/cnt/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div id="gsWidget"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="250" height="40" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="window" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="hostname=cowbell.grooveshark.com&amp;songID=7446723&amp;style=undefined" /><param name="src" value="http://listen.grooveshark.com/songWidget.swf" /><embed type="application/x-shockwave-flash" width="250" height="40" src="http://listen.grooveshark.com/songWidget.swf" flashvars="hostname=cowbell.grooveshark.com&amp;songID=7446723&amp;style=undefined" allowscriptaccess="always" wmode="window"></embed></object></div>
<div><span id="more-514"></span></div>
]]></content:encoded>
			<wfw:commentRss>http://onlydot.net/cnt/2010/11/giving-up-giving-in/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How We Do by Mount Sims</title>
		<link>http://onlydot.net/cnt/2010/11/how-we-do-by-mount-sims/</link>
		<comments>http://onlydot.net/cnt/2010/11/how-we-do-by-mount-sims/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 23:27:55 +0000</pubDate>
		<dc:creator>Andres</dc:creator>
				<category><![CDATA[Songs]]></category>
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://onlydot.net/cnt/?p=512</guid>
		<description><![CDATA[<div id="gsWidget"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="250" height="40" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="window" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="hostname=cowbell.grooveshark.com&#38;songID=1073761&#38;style=undefined" /><param name="src" value="http://listen.grooveshark.com/songWidget.swf" /><embed type="application/x-shockwave-flash" width="250" height="40" src="http://listen.grooveshark.com/songWidget.swf" flashvars="hostname=cowbell.grooveshark.com&#38;songID=1073761&#38;style=undefined" allowscriptaccess="always" wmode="window"></embed></object>&#8230;</div>]]></description>
			<content:encoded><![CDATA[<div id="gsWidget"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="250" height="40" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="wmode" value="window" /><param name="allowScriptAccess" value="always" /><param name="flashvars" value="hostname=cowbell.grooveshark.com&amp;songID=1073761&amp;style=undefined" /><param name="src" value="http://listen.grooveshark.com/songWidget.swf" /><embed type="application/x-shockwave-flash" width="250" height="40" src="http://listen.grooveshark.com/songWidget.swf" flashvars="hostname=cowbell.grooveshark.com&amp;songID=1073761&amp;style=undefined" allowscriptaccess="always" wmode="window"></embed></object></div>
]]></content:encoded>
			<wfw:commentRss>http://onlydot.net/cnt/2010/11/how-we-do-by-mount-sims/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Torrent Client &#8211; Basic Loop</title>
		<link>http://onlydot.net/cnt/2010/11/torrent-client-basic-loop/</link>
		<comments>http://onlydot.net/cnt/2010/11/torrent-client-basic-loop/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 15:46:53 +0000</pubDate>
		<dc:creator>Andres</dc:creator>
				<category><![CDATA[SLM]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[torrent client]]></category>

		<guid isPermaLink="false">http://onlydot.net/cnt/?p=509</guid>
		<description><![CDATA[<p>This is a basic loop for a text torrent client, this file is only for testing and has not been cleaned up or commented.<br />
<span id="more-509"></span></p>
<div class="codecolorer-container perl blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!c:\Perl\bin\perl.exe</span><br />
<br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$tor_client</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'C:\WINDOWS\slm\ghoster.exe'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># Path to torrent Client</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$tor_url</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'http://download.opensuse.org/distribution/11.1/iso/openSUSE-11.1-DVD-i586.iso.torrent'</span><span style="color: #339933;">;</span></div>&#8230;</div>]]></description>
			<content:encoded><![CDATA[<p>This is a basic loop for a text torrent client, this file is only for testing and has not been cleaned up or commented.<br />
<span id="more-509"></span></p>
<div class="codecolorer-container perl blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!c:\Perl\bin\perl.exe</span><br />
<br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$tor_client</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'C:\WINDOWS\slm\ghoster.exe'</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># Path to torrent Client</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$tor_url</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'http://download.opensuse.org/distribution/11.1/iso/openSUSE-11.1-DVD-i586.iso.torrent'</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$save_to</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'D:\temp1'</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$infofile</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'some.txt'</span><span style="color: #339933;">;</span><br />
<span style="color: #666666; font-style: italic;">######</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Declare when file open</span><br />
<span style="color: #0000ff;">%tor_cli_inf</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$counter</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$cmd</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;$tor_client --url $tor_url --saveas $save_to &quot;</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #0000ff;">$tor_cli_inf</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'pid'</span><span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> <a href="http://perldoc.perl.org/functions/open.html"><span style="color: #000066;">open</span></a><span style="color: #009900;">&#40;</span>PROGRAM_OUTPUT<span style="color: #339933;">,</span> <span style="color: #ff0000;">&quot;$cmd |&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">#or client.exe</span><br />
<br />
<span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$t2mp</span> <span style="color: #339933;">&lt;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">10</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<br />
<span style="color: #666666; font-style: italic;">##############################</span><br />
<span style="color: #666666; font-style: italic;">#### Loop 100 Lines of output</span><br />
<span style="color: #666666; font-style: italic;"># Set main check counter to 0</span><br />
<br />
<span style="color: #0000ff;">$counter</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$er</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$errc</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$problem</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #0000ff;">$success</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
FIN<span style="color: #339933;">:</span> <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #009999;">&lt;PROGRAM_OUTPUT&gt;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$line</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$_</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># Grab the line printed by PROGRAM_OUTPUT</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Check Counter</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$counter</span> <span style="color: #339933;">&gt;=</span> <span style="color: #cc66cc;">100</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">last</span> FIN<span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #666666; font-style: italic;"># Check if $counter is equal or higher to 100</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$counter</span><span style="color: #339933;">++;</span> <span style="color: #666666; font-style: italic;"># Increase $counter</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/^\n$/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #0000ff;">$counter</span><span style="color: #339933;">--;</span>&nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #666666; font-style: italic;"># If empty line, decrease counter by 1</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">## Check output and append to a variable</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/^ERROR:/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #b1b100;">next</span> FIN<span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <span style="color: #666666; font-style: italic;"># Error, Jump to next line</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/^IO Error: \[Errno 13\] Permission denied$/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$tor_cli_inf</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'error'</span><span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;Download Failed - $line&quot;</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$problem</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/^rejected by tracker/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> &nbsp;<span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/bad url$/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> &nbsp;<span style="color: #009900;">&#125;</span> <span style="color: #666666; font-style: italic;"># TODO! Email Admin</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/^saving:/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">@pair</span> <span style="color: #339933;">=</span> <a href="http://perldoc.perl.org/functions/split.html"><span style="color: #000066;">split</span></a><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">' &nbsp; &nbsp; &nbsp; &nbsp; '</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$line</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># Do not Change</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$pair</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/\s+$//</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$tor_cli_inf</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'saving'</span><span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$pair</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/^percent done:/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/^percent done: &nbsp; 100?$/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;"># Finished Download / Updated Variables</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$tor_cli_inf</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'percent'</span><span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">100</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$tor_cli_inf</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'error'</span><span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;Image Ready&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$success</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">@pair</span> <span style="color: #339933;">=</span> <a href="http://perldoc.perl.org/functions/split.html"><span style="color: #000066;">split</span></a><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">' &nbsp; '</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$line</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># Do not Change</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$pair</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/\s+$//</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$tor_cli_inf</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'percent'</span><span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$pair</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/^time left:/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/Download Failed!$/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$tor_cli_inf</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'error'</span><span style="color: #009900;">&#125;</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/^IO Error: \[Errno 13\] Permission denied$/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$problem</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">last</span> FIN<span style="color: #339933;">;</span> &nbsp;<span style="color: #009900;">&#125;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/^time left: &nbsp; &nbsp; &nbsp;checking existing data$/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$tor_cli_inf</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'error'</span><span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;checking existing data&quot;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/^time left: &nbsp; &nbsp; &nbsp;Download Succeeded!$/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$tor_cli_inf</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'percent'</span><span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">100</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$tor_cli_inf</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'error'</span><span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;Image Ready&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">last</span> FIN<span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">@pair</span> <span style="color: #339933;">=</span> <a href="http://perldoc.perl.org/functions/split.html"><span style="color: #000066;">split</span></a><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">' &nbsp; &nbsp; &nbsp;'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$line</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># Do not Change</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$pair</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/\s+$//</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$tor_cli_inf</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">'timeleft'</span><span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$pair</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;$t2mp <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$t2mp</span><span style="color: #339933;">++;</span><br />
<span style="color: #009900;">&#125;</span><br />
<br />
<a href="http://perldoc.perl.org/functions/close.html"><span style="color: #000066;">close</span></a> <span style="color: #009900;">&#40;</span>PROGRAM_OUTPUT<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;close client&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #0000ff;">$killgho</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;taskkill <span style="color: #000099; font-weight: bold;">\/</span>IM ghoster.exe <span style="color: #000099; font-weight: bold;">\/</span>F&quot;</span><span style="color: #339933;">;</span><br />
<a href="http://perldoc.perl.org/functions/system.html"><span style="color: #000066;">system</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$killgho</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<br />
<a href="http://perldoc.perl.org/functions/exit.html"><span style="color: #000066;">exit</span></a> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">sub</span> imageinfo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span>e <span style="color: #0000ff;">$infofile</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&amp;log_print</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;print&quot;</span><span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;Image Info file exist, getting information&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/open.html"><span style="color: #000066;">open</span></a><span style="color: #009900;">&#40;</span>INFFILE<span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;&lt; &quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$infofile</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&amp;log_print</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;print&quot;</span><span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;$infofile -File could not open $!&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/flock.html"><span style="color: #000066;">flock</span></a><span style="color: #009900;">&#40;</span>INFFILE<span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <a href="http://perldoc.perl.org/functions/seek.html"><span style="color: #000066;">seek</span></a> <span style="color: #009900;">&#40;</span>INFFILE<span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">foreach</span> <span style="color: #0000ff;">$line</span> <span style="color: #009900;">&#40;</span><span style="color: #009999;">&lt;INFFILE&gt;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/^saving:/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">@pair</span> <span style="color: #339933;">=</span> <a href="http://perldoc.perl.org/functions/split.html"><span style="color: #000066;">split</span></a><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">' &nbsp; &nbsp; &nbsp; &nbsp; '</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$line</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># Do not Change</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$pair</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/\s+$//</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$in_1</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$pair</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/^percent done:/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">@pair</span> <span style="color: #339933;">=</span> <a href="http://perldoc.perl.org/functions/split.html"><span style="color: #000066;">split</span></a><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">' &nbsp; '</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$line</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># Do not Change</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$pair</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/\s+$//</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$in_2</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$pair</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/^time left:/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">@pair</span> <span style="color: #339933;">=</span> <a href="http://perldoc.perl.org/functions/split.html"><span style="color: #000066;">split</span></a><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">' &nbsp; &nbsp; &nbsp;'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$line</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># Do not Change</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$pair</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/\s+$//</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$in_3</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$pair</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/^counter:/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">@pair</span> <span style="color: #339933;">=</span> <a href="http://perldoc.perl.org/functions/split.html"><span style="color: #000066;">split</span></a><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">' &nbsp; &nbsp; &nbsp; &nbsp;'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$line</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># Do not Change</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$pair</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/\s+$//</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$in_4</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$pair</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/^ErrorLog:/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">@pair</span> <span style="color: #339933;">=</span> <a href="http://perldoc.perl.org/functions/split.html"><span style="color: #000066;">split</span></a><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">' &nbsp; &nbsp; &nbsp; '</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$line</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;"># Do not Change</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$pair</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/\s+$//</span><span style="color: #339933;">;</span> <span style="color: #0000ff;">$errlog</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$pair</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/close.html"><span style="color: #000066;">close</span></a> INFFILE<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$img_inf_file</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #0000ff;">$in_1</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$in_2</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$in_3</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$in_4</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$errlog</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/return.html"><span style="color: #000066;">return</span></a> <span style="color: #0000ff;">$img_inf_file</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$img_inf_file</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;none&quot;</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">&amp;log_print</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;print&quot;</span><span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;No image information file&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/return.html"><span style="color: #000066;">return</span></a> <span style="color: #0000ff;">$img_inf_file</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://onlydot.net/cnt/2010/11/torrent-client-basic-loop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Batch remove file generator</title>
		<link>http://onlydot.net/cnt/2010/11/batch-remove-file-generator/</link>
		<comments>http://onlydot.net/cnt/2010/11/batch-remove-file-generator/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 15:36:12 +0000</pubDate>
		<dc:creator>Andres</dc:creator>
				<category><![CDATA[Files/Scripts]]></category>
		<category><![CDATA[blackboard]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://onlydot.net/cnt/?p=503</guid>
		<description><![CDATA[<p>A second file needed for the <a href="http://onlydot.net/cnt/2010/11/cleanup-output-blackboard-enrollment-html-page/">Cleanup output – Blackboard enrollment</a> post.<br />
<span id="more-503"></span></p>
<div class="codecolorer-container perl blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!c:\Perl\bin\perl.exe</span><br />
<br />
<span style="color: #666666; font-style: italic;">##################################</span><br />
<span style="color: #666666; font-style: italic;"># Version 1.0 &#160; &#160; &#160; &#160;Nov 26 2009 #</span><br />
<span style="color: #666666; font-style: italic;">##################################</span><br />
<span style="color: #666666; font-style: italic;">##</span><br />
<br />
<span style="color: #0000ff;">$employeeid</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'000000000'</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Read this file</span><br />
<span style="color: #0000ff;">$readthis</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'./cleaned.txt'</span><span style="color: #339933;">;</span><br />
<span style="color: #0000ff;">$writeto</span> <span style="color: #339933;">=</span></div>&#8230;</div>]]></description>
			<content:encoded><![CDATA[<p>A second file needed for the <a href="http://onlydot.net/cnt/2010/11/cleanup-output-blackboard-enrollment-html-page/">Cleanup output – Blackboard enrollment</a> post.<br />
<span id="more-503"></span></p>
<div class="codecolorer-container perl blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!c:\Perl\bin\perl.exe</span><br />
<br />
<span style="color: #666666; font-style: italic;">##################################</span><br />
<span style="color: #666666; font-style: italic;"># Version 1.0 &nbsp; &nbsp; &nbsp; &nbsp;Nov 26 2009 #</span><br />
<span style="color: #666666; font-style: italic;">##################################</span><br />
<span style="color: #666666; font-style: italic;">##</span><br />
<br />
<span style="color: #0000ff;">$employeeid</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'000000000'</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Read this file</span><br />
<span style="color: #0000ff;">$readthis</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'./cleaned.txt'</span><span style="color: #339933;">;</span><br />
<span style="color: #0000ff;">$writeto</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'./batchremove.txt'</span><span style="color: #339933;">;</span><br />
<br />
<br />
<span style="color: #666666; font-style: italic;"># Open files</span><br />
<a href="http://perldoc.perl.org/functions/open.html"><span style="color: #000066;">open</span></a><span style="color: #009900;">&#40;</span>WRITE<span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$writeto</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #009900;">&#40;</span> <a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;$writeto - File could not open $!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://perldoc.perl.org/functions/open.html"><span style="color: #000066;">open</span></a><span style="color: #009900;">&#40;</span>READ<span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;&lt; &quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$readthis</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #009900;">&#40;</span><a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;$readthis - File could not open $!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://perldoc.perl.org/functions/flock.html"><span style="color: #000066;">flock</span></a><span style="color: #009900;">&#40;</span>READ<span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://perldoc.perl.org/functions/seek.html"><span style="color: #000066;">seek</span></a><span style="color: #009900;">&#40;</span>READ<span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #0000ff;">$y</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">foreach</span> <span style="color: #0000ff;">$line</span> <span style="color: #009900;">&#40;</span><span style="color: #009999;">&lt;READ&gt;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/chomp.html"><span style="color: #000066;">chomp</span></a> <span style="color: #0000ff;">$line</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/\s+$//</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">#ICA001AK.BUNH.20083|Teaching Assistant</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># /^(.{7,8})\.(.{4})\.(.{5})\|(Teaching Assistant|Instructor|Course Builder|Student|)$/</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># &nbsp; &nbsp; &nbsp; 1 &nbsp; &nbsp; &nbsp; &nbsp;2 &nbsp; &nbsp; &nbsp;3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 4</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/^(.{7,8})\.(.{4})\.(.{5})\|(Teaching Assistant|Instructor|Course Builder|Grader|Student|)$/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;">#print WRITE &quot;$1|$2 \n&quot;;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$coursecode</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$1</span><span style="color: #339933;">;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$year</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$3</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$facl</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$2</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$role</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$4</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$coursecode</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/^.{7}$/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> WRITE<span style="color: #ff0000;">&quot;$employeeid|$year$coursecode-$facl|$role|y|enabled<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> WRITE <span style="color: #ff0000;">&quot;$employeeid|$year$coursecode$facl|$role|y|enabled<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">$y</span><span style="color: #339933;">++;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
<a href="http://perldoc.perl.org/functions/close.html"><span style="color: #000066;">close</span></a> READ<span style="color: #339933;">;</span><br />
<a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> WRITE <span style="color: #0000ff;">$y</span><span style="color: #339933;">;</span><br />
<a href="http://perldoc.perl.org/functions/close.html"><span style="color: #000066;">close</span></a> WRITE<span style="color: #339933;">;</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://onlydot.net/cnt/2010/11/batch-remove-file-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cleanup output &#8211; Blackboard enrollment (html page)</title>
		<link>http://onlydot.net/cnt/2010/11/cleanup-output-blackboard-enrollment-html-page/</link>
		<comments>http://onlydot.net/cnt/2010/11/cleanup-output-blackboard-enrollment-html-page/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 15:17:36 +0000</pubDate>
		<dc:creator>Andres</dc:creator>
				<category><![CDATA[Files/Scripts]]></category>
		<category><![CDATA[blackboard]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://onlydot.net/cnt/?p=494</guid>
		<description><![CDATA[<p>This perl script is used to clean up the output of a users enrolment when the &#8220;course enrolment&#8221; is listed in the web page.<br />
<span id="more-494"></span><br />
file name &#8220;cleanup.pl&#8221;</p>
<div class="codecolorer-container perl blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!c:\Perl\bin\perl.exe</span><br />
<br />
<span style="color: #666666; font-style: italic;">##################################</span><br />
<span style="color: #666666; font-style: italic;"># Version 1.0 &#160; &#160; &#160; &#160;Nov 26 2009 #</span><br />
<span style="color: #666666; font-style: italic;">##################################</span></div>&#8230;</div>]]></description>
			<content:encoded><![CDATA[<p>This perl script is used to clean up the output of a users enrolment when the &#8220;course enrolment&#8221; is listed in the web page.<br />
<span id="more-494"></span><br />
file name &#8220;cleanup.pl&#8221;</p>
<div class="codecolorer-container perl blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!c:\Perl\bin\perl.exe</span><br />
<br />
<span style="color: #666666; font-style: italic;">##################################</span><br />
<span style="color: #666666; font-style: italic;"># Version 1.0 &nbsp; &nbsp; &nbsp; &nbsp;Nov 26 2009 #</span><br />
<span style="color: #666666; font-style: italic;">##################################</span><br />
<span style="color: #666666; font-style: italic;">##</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Read this file</span><br />
<span style="color: #0000ff;">$readthis</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'./output.txt'</span><span style="color: #339933;">;</span><br />
<span style="color: #0000ff;">$writeto</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'./cleaned.txt'</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Open files</span><br />
<a href="http://perldoc.perl.org/functions/open.html"><span style="color: #000066;">open</span></a><span style="color: #009900;">&#40;</span>WRITE<span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;&amp;gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$writeto</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #009900;">&#40;</span> <a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;$writeto - File could not open $!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://perldoc.perl.org/functions/open.html"><span style="color: #000066;">open</span></a><span style="color: #009900;">&#40;</span>READ<span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;&amp;lt; &quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$readthis</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #009900;">&#40;</span><a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;$readthis - File could not open $!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://perldoc.perl.org/functions/flock.html"><span style="color: #000066;">flock</span></a><span style="color: #009900;">&#40;</span>READ<span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://perldoc.perl.org/functions/seek.html"><span style="color: #000066;">seek</span></a><span style="color: #009900;">&#40;</span>READ<span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #0000ff;">$y</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">foreach</span> <span style="color: #0000ff;">$line</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<a href="http://perldoc.perl.org/functions/chomp.html"><span style="color: #000066;">chomp</span></a> <span style="color: #0000ff;">$line</span><span style="color: #339933;">;</span><br />
<span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">s/\s+$//</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$line</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/^\t(.{7,8}\..{4}\..{5})(.*)\t(Teaching_Assistant|Instructor|Course_Builder|Grader|Student)$/</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> WRITE <span style="color: #ff0000;">&quot;$1|$3 <span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #0000ff;">$y</span><span style="color: #339933;">++;</span><br />
<span style="color: #009900;">&#125;</span><br />
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
<a href="http://perldoc.perl.org/functions/close.html"><span style="color: #000066;">close</span></a> READ<span style="color: #339933;">;</span><br />
<a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> WRITE <span style="color: #0000ff;">$y</span><span style="color: #339933;">;</span><br />
<a href="http://perldoc.perl.org/functions/close.html"><span style="color: #000066;">close</span></a> WRITE<span style="color: #339933;">;</span></div></div>
<p>Usage:<br />
1) Search for the user in the &#8220;Admin panel&#8221;<br />
2) Access the &#8220;Course Enrolments&#8221;<br />
3) Display all pages<br />
4) Select all the list &#8220;copy and paste&#8221; in to a text file named &#8220;output.txt&#8221; (use notepad)</p>
<p>output will look similar to this:</p>
<div class="codecolorer-container text blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">SOMECUR1.SETS.20083<br />
Menu Options:Course ID<br />
<br />
* Close Menu<br />
* Manage<br />
* Open<br />
<br />
SOMECUR1.SETS.20083 - Introduction to Computers &nbsp; &nbsp; &nbsp; &nbsp; Teaching Assistant<br />
SOMECUR2.SETS.20083<br />
Menu Options:Course ID<br />
<br />
* Close Menu<br />
* Manage<br />
* Open<br />
<br />
SOMECUR2.SETS.20083 - Introduction to Computers &nbsp; &nbsp; &nbsp; &nbsp; Teaching Assistant</div></div>
<p><strong>AS a requirement the course ID must be part of the name</strong></p>
<p>5) Place output.txt in the same directory as cleanup.pl<br />
6) execute cleanup.pl<br />
7) A new file &#8216;cleaned.txt&#8217; will be created.</p>
]]></content:encoded>
			<wfw:commentRss>http://onlydot.net/cnt/2010/11/cleanup-output-blackboard-enrollment-html-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Sky</title>
		<link>http://onlydot.net/cnt/2010/11/the-sky/</link>
		<comments>http://onlydot.net/cnt/2010/11/the-sky/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 19:39:17 +0000</pubDate>
		<dc:creator>Andres</dc:creator>
				<category><![CDATA[Collections]]></category>
		<category><![CDATA[Reason will make you free]]></category>
		<category><![CDATA[the sky]]></category>

		<guid isPermaLink="false">http://onlydot.net/cnt/?p=488</guid>
		<description><![CDATA[<p>A collection of Sky photos taken with different cameras.<br />

<div class="ngg-galleryoverview" id="ngg-gallery-6-488">

	<!-- Slideshow link -->
	<div class="slideshowlink">
		<a class="slideshowlink" href="http://onlydot.net/cnt/2010/11/the-sky/?show=slide">
			View as slideshow		</a>
	</div>

	<!-- Piclense link -->
	<div class="piclenselink">
		<a class="piclenselink" href="javascript:PicLensLite.start({feedUrl:'http://onlydot.net/cnt/wp-content/plugins/nextgen-gallery/xml/media-rss.php?gid=6&#38;mode=gallery'});">
			[View with PicLens]		</a>
	</div>
	
	<!-- Thumbnails -->
		
	<div id="ngg-image-109" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/IMG_0110.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="IMG_0110" alt="IMG_0110" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_IMG_0110.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-110" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/IMG_0558.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="IMG_0558" alt="IMG_0558" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_IMG_0558.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-111" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/IMG_0585.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="IMG_0585" alt="IMG_0585" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_IMG_0585.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-112" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/IMG_0586.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="IMG_0586" alt="IMG_0586" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_IMG_0586.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-113" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/IMG_0599.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="IMG_0599" alt="IMG_0599" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_IMG_0599.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-114" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/IMG_0604.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="IMG_0604" alt="IMG_0604" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_IMG_0604.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-115" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/IMG_1112.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="IMG_1112" alt="IMG_1112" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_IMG_1112.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-116" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/IMG_1385.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="IMG_1385" alt="IMG_1385" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_IMG_1385.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-117" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/IMG_2197.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="IMG_2197" alt="IMG_2197" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_IMG_2197.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-118" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/IMG_2700.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="IMG_2700" alt="IMG_2700" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_IMG_2700.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-119" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/June-1-09 010.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="June-1-09 010" alt="June-1-09 010" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_June-1-09 010.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-120" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/drift_ 003.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="Jan_10_2010" alt="Jan_10_2010" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_drift_ 003.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-121" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/pics 006.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="pics 006" alt="pics 006" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_pics 006.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-122" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/temp 013.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="temp 013" alt="temp 013" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_temp 013.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>A collection of Sky photos taken with different cameras.<br />

<div class="ngg-galleryoverview" id="ngg-gallery-6-488">

	<!-- Slideshow link -->
	<div class="slideshowlink">
		<a class="slideshowlink" href="http://onlydot.net/cnt/2010/11/the-sky/?show=slide">
			View as slideshow		</a>
	</div>

	<!-- Piclense link -->
	<div class="piclenselink">
		<a class="piclenselink" href="javascript:PicLensLite.start({feedUrl:'http://onlydot.net/cnt/wp-content/plugins/nextgen-gallery/xml/media-rss.php?gid=6&amp;mode=gallery'});">
			[View with PicLens]		</a>
	</div>
	
	<!-- Thumbnails -->
		
	<div id="ngg-image-109" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/IMG_0110.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="IMG_0110" alt="IMG_0110" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_IMG_0110.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-110" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/IMG_0558.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="IMG_0558" alt="IMG_0558" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_IMG_0558.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-111" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/IMG_0585.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="IMG_0585" alt="IMG_0585" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_IMG_0585.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-112" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/IMG_0586.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="IMG_0586" alt="IMG_0586" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_IMG_0586.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-113" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/IMG_0599.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="IMG_0599" alt="IMG_0599" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_IMG_0599.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-114" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/IMG_0604.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="IMG_0604" alt="IMG_0604" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_IMG_0604.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-115" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/IMG_1112.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="IMG_1112" alt="IMG_1112" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_IMG_1112.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-116" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/IMG_1385.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="IMG_1385" alt="IMG_1385" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_IMG_1385.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-117" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/IMG_2197.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="IMG_2197" alt="IMG_2197" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_IMG_2197.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-118" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/IMG_2700.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="IMG_2700" alt="IMG_2700" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_IMG_2700.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-119" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/June-1-09 010.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="June-1-09 010" alt="June-1-09 010" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_June-1-09 010.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-120" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/drift_ 003.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="Jan_10_2010" alt="Jan_10_2010" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_drift_ 003.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-121" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/pics 006.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="pics 006" alt="pics 006" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_pics 006.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 		
	<div id="ngg-image-122" class="ngg-gallery-thumbnail-box"  >
		<div class="ngg-gallery-thumbnail" >
			<a href="http://onlydot.net/cnt/wp-content/gallery/the_sky/temp 013.jpg" title=" " class="thickbox" rel="set_6" >
								<img title="temp 013" alt="temp 013" src="http://onlydot.net/cnt/wp-content/gallery/the_sky/thumbs/thumbs_temp 013.jpg" width="100" height="75" />
							</a>
		</div>
	</div>
	
		
 	 	
	<!-- Pagination -->
 	<div class='ngg-clear'></div>
 	
</div>

</p>
]]></content:encoded>
			<wfw:commentRss>http://onlydot.net/cnt/2010/11/the-sky/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl Binary Download</title>
		<link>http://onlydot.net/cnt/2010/11/perl-binary-download/</link>
		<comments>http://onlydot.net/cnt/2010/11/perl-binary-download/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 18:11:36 +0000</pubDate>
		<dc:creator>Andres</dc:creator>
				<category><![CDATA[Files/Scripts]]></category>
		<category><![CDATA[SLM]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://onlydot.net/cnt/?p=484</guid>
		<description><![CDATA[<p>The following script will allow a client machine to download a binary file from a web server.<br />
<span id="more-484"></span></p>
<div class="codecolorer-container perl blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!c:\Perl\bin\perl.exe</span><br />
<br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$ScriptDir</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'C:\Windows\slm'</span><span style="color: #339933;">;</span> &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #666666; font-style: italic;"># Directory where script is downloaded</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$temporal</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&#34;$ScriptDir</span></div>&#8230;</div>]]></description>
			<content:encoded><![CDATA[<p>The following script will allow a client machine to download a binary file from a web server.<br />
<span id="more-484"></span></p>
<div class="codecolorer-container perl blackboard" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;"><div class="perl codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!c:\Perl\bin\perl.exe</span><br />
<br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$ScriptDir</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">'C:\Windows\slm'</span><span style="color: #339933;">;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># Directory where script is downloaded</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$temporal</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;$ScriptDir<span style="color: #000099; font-weight: bold;">\\</span>some.exe&quot;</span><span style="color: #339933;">;</span>&nbsp; <span style="color: #666666; font-style: italic;"># Location of the binary to be downloaded</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Web Browser generation</span><br />
<span style="color: #000000; font-weight: bold;">use</span> URI<span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">use</span> LWP<span style="color: #339933;">;</span><br />
<br />
<span style="color: #0000ff;">$mfilecont</span> <span style="color: #339933;">=</span><span style="color: #ff0000;">''</span><span style="color: #339933;">;</span><br />
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$browser</span> <span style="color: #339933;">=</span> LWP<span style="color: #339933;">::</span><span style="color: #006600;">UserAgent</span><span style="color: #339933;">-&gt;</span><span style="color: #000000; font-weight: bold;">new</span><span style="color: #339933;">;</span><br />
<br />
<span style="color: #666666; font-style: italic;"># Some File hosted somewhere</span><br />
<span style="color: #0000ff;">$url</span> <span style="color: #339933;">=</span> URI<span style="color: #339933;">-&gt;</span><span style="color: #000000; font-weight: bold;">new</span><span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'http://1.1.5.10/some.exe'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #0000ff;">$url</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">query_form</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #0000ff;">$mfilecont</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$browser</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://perldoc.perl.org/functions/open.html"><span style="color: #000066;">open</span></a> <span style="color: #009900;">&#40;</span>TEMPORAL<span style="color: #339933;">,</span><span style="color: #ff0000;">&quot;&gt;&quot;</span><span style="color: #339933;">,</span><span style="color: #0000ff;">$temporal</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">or</span> <a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #009900;">&#40;</span><a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;$temporal - File could not open $!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://perldoc.perl.org/functions/binmode.html"><span style="color: #000066;">binmode</span></a><span style="color: #009900;">&#40;</span>TEMPORAL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> TEMPORAL <span style="color: #0000ff;">$mfilecont</span><span style="color: #339933;">-&gt;</span><span style="color: #006600;">content</span><span style="color: #339933;">;</span><br />
<a href="http://perldoc.perl.org/functions/close.html"><span style="color: #000066;">close</span></a> TEMPORAL<span style="color: #339933;">;</span><br />
<br />
<a href="http://perldoc.perl.org/functions/exit.html"><span style="color: #000066;">exit</span></a><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>If &#8220;Non-binary&#8221; download is required, simply comment out <code class="codecolorer perl blackboard"><span class="perl"><a href="http://perldoc.perl.org/functions/binmode.html"><span style="color: #000066;">binmode</span></a><span style="color: #009900;">&#40;</span>TEMPORAL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></span></code></p>
]]></content:encoded>
			<wfw:commentRss>http://onlydot.net/cnt/2010/11/perl-binary-download/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding Browsers to awstats</title>
		<link>http://onlydot.net/cnt/2010/11/adding-browsers-to-awstats/</link>
		<comments>http://onlydot.net/cnt/2010/11/adding-browsers-to-awstats/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 16:52:09 +0000</pubDate>
		<dc:creator>Andres</dc:creator>
				<category><![CDATA[Files/Scripts]]></category>
		<category><![CDATA[awstats]]></category>
		<category><![CDATA[moding]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[Web Browser]]></category>

		<guid isPermaLink="false">http://onlydot.net/cnt/?p=473</guid>
		<description><![CDATA[<p>Recently I&#8217;ve been implementing <a href="http://awstats.sourceforge.net/">awstats</a>, to obtain some statistics and information about the usage of some the services for work. Its been quite challenging as you may have noticed from earlier posts to gather the log files in a &#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been implementing <a href="http://awstats.sourceforge.net/">awstats</a>, to obtain some statistics and information about the usage of some the services for work. Its been quite challenging as you may have noticed from earlier posts to gather the log files in a single location where they can all be analyzed, but it has been accomplished.<br />
<span id="more-473"></span><br />
As soon as I obtain my first day of statistics, I found loads of useful information but required something a bit more specific. I was requested to investigate the use of web browsers, specifically for tools that make use of  our &#8220;WebDav&#8221; system. So I needed to add a browser(s) to the list generated by awstats. with no time to put in a request and wait for an update from the developers at awstats (I really didn&#8217;t think of contacting them), I decided to get my hands a little dirty and try to add the <a href="http://www.webdrive.com/">WebDrive</a> tool in the list of browsers.</p>
<p>My First attempt was to modify the <strong>./lib/browsers.pm</strong> file. Simple enough as describes by many sources in the Internet,  I added a few lines of code:</p>
<ul>
<li>In the <code class="codecolorer perl blackboard"><span class="perl"><span style="color: #0000ff;">@BrowsersSearchIDOrder</span></span></code> Array I added an ID for <strong>&#8216;webdrive&#8217;</strong> in a new line. Be sure to add a comma to follow the structure of the array and avoid errors.</li>
<li>In the <code class="codecolorer perl blackboard"><span class="perl"><span style="color: #0000ff;">%BrowsersHashIDLib</span></span></code> Hash I added an ID/Name reference like so; <strong>&#8216;webdrive&#8217;,'WebDrive&#8217;</strong>. Again be careful with the commas!.</li>
<li>A .png icon file was added <strong>./wwwroot/icon/browser/webdrive.png</strong> to make it a little fancy. Of course a reference is needed to be added in the <code class="codecolorer perl blackboard"><span class="perl"><span style="color: #0000ff;">%BrowsersHashIcon</span></span></code> Hash that reference the browser Id and the file, like so <strong>&#8216;webdrive&#8217;,'webdrive&#8217;</strong>.</li>
</ul>
<p>And that was it, next time the awstats &#8216;cron&#8217; job run, the browser was in the Browsers &gt; Versions area. That was simple and now I had some information to show to my boss if he needed it.</p>
<p>Of course that was not the end, later I noticed I had multiple versions of the same &#8220;browser&#8221; and like Firefox, IE, or Safari I wanted to see the different versions listed with their individual stats, not just a single item with all the statistics, but how?. Well here is where I needed to get my hands a little dirty. (The information below requires modifying your awstats.pl file <strong>version 6.95 at the time of this post</strong>, please make a backup of the file and don&#8217;t blame me for breaking it, you are fully responsible of any changes you make!)</p>
<p>So I open the <strong>./wwwroot/cgi-bin/awstats.pl</strong> file (<strong>Note</strong>: file location may change based on OS and installation) and modify a few things to get my different versions of the browser listed:</p>
<ul>
<li>In line 400 you will find the <code class="codecolorer perl blackboard"><span class="perl"><span style="color: #0000ff;">%BrowsersFamily</span></span></code> hash which contains a list of all browser families, here I added a new line for my web browser as follows <code class="codecolorer perl blackboard"><span class="perl"><span style="color: #ff0000;">'webdrive'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">9</span></span></code>. Please be sure to add the commas where required.</li>
<li>In line 10567 you will find &#8220;# Define precompiled regex&#8221;, here the developers create multiple regular expressions to check and grab the browser information/version. Using the &#8220;konqueror&#8221; regular expression I added my own right below it:<br />
<code class="codecolorer perl blackboard"><span class="perl"><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$regverwebdrive</span> &nbsp; &nbsp;<span style="color: #339933;">=</span> <span style="color: #009966; font-style: italic;">qr/WebDrive\s([\d\.]*)/i</span><span style="color: #339933;">;</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #666666; font-style: italic;"># WebDrive</span></span></code><br />
This will basically check for the string &#8220;WebDrive 8.0.1.2&#8243; or similar, but I was not done yet.</li>
<li>further down, in line 12096 (or near it), is where I found the &#8220;Analyze: Browser&#8221; starts. Here I added a statement to check for &#8220;WebDrive&#8221; just before &#8220;# Other known Browsers&#8221; (near line 12180).<br />
<code class="codecolorer perl blackboard"><span class="perl"><span style="color: #666666; font-style: italic;"># WebDrive Version ...? Hopefully this works :)</span><br />
<span style="color: #b1b100;">elsif</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$UserAgent</span> <span style="color: #339933;">=~</span> <span style="color: #009966; font-style: italic;">/$regverwebdrive/o</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
<span style="color: #0000ff;">$_browser_h</span><span style="color: #009900;">&#123;</span><span style="color: #ff0000;">&quot;webdrive$1&quot;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">++;</span><br />
<span style="color: #0000ff;">$TmpBrowser</span><span style="color: #009900;">&#123;</span><span style="color: #0000ff;">$UserAgent</span><span style="color: #009900;">&#125;</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;webdrive$1&quot;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></span></code><br />
Ideally the operation checks the string against my regular expression and if we have a match we first add a counter to the <em>$_browser_h{&#8220;webdrive$1&#8243;}</em> variable, then we also add the browser and version to the <em>$TmpBrowser{$UserAgent}</em> variable.</li>
</ul>
<p>Thats it!!, let awstats run and you will find the browser and different versions listed in your awstats analysis.</p>
<p>I really hope this information gives you and idea of what you need to do and good luck!.</p>
<p><strong>UPDATE  (May-10/2011)</strong>: So I made an update of the Awstats Version 6.95 to 7.0 and of course I wanted my changes to go over. So Here are a few tips:</p>
<ul>
<li>%BrowserFamily is now located in the ./lib/browsers.pm folder.</li>
<li>The &#8220;Define precompile regex&#8221; are now located in line 17454.</li>
<li>The &#8220;Analyze: Browser&#8221; is now located in line 19001.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://onlydot.net/cnt/2010/11/adding-browsers-to-awstats/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

