<?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>DogmawBlog</title>
	<atom:link href="http://blog.dogmawglass.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.dogmawglass.com</link>
	<description>All the Dogmaw that's fit to read!</description>
	<lastBuildDate>Wed, 25 Aug 2010 23:58:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Ummm&#8230; this thing on?</title>
		<link>http://blog.dogmawglass.com/2010/08/25/ummm-this-thing-on/</link>
		<comments>http://blog.dogmawglass.com/2010/08/25/ummm-this-thing-on/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 23:58:34 +0000</pubDate>
		<dc:creator>Shopmonkey Chris</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.dogmawglass.com/?p=654</guid>
		<description><![CDATA[It appears so. Bit of technical difficulty at our end, what with the schooling and the traveling and the squids and such. We now rejoin your regularly scheduled DogmawBlog, already in progress&#8230;]]></description>
			<content:encoded><![CDATA[<p>It appears so.  Bit of technical difficulty at our end, what with the schooling and the traveling and the squids and such.</p>
<p>We now rejoin your regularly scheduled DogmawBlog, already in progress&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dogmawglass.com/2010/08/25/ummm-this-thing-on/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Perl multiplication table with nested for loops</title>
		<link>http://blog.dogmawglass.com/2010/07/24/perl-multiplication-table-with-nested-for-loops/</link>
		<comments>http://blog.dogmawglass.com/2010/07/24/perl-multiplication-table-with-nested-for-loops/#comments</comments>
		<pubDate>Sun, 25 Jul 2010 03:02:48 +0000</pubDate>
		<dc:creator>johoff</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[for loop]]></category>
		<category><![CDATA[nested]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://blog.dogmawglass.com/?p=651</guid>
		<description><![CDATA[Print out a multiplication table from 0 to 9. for ($count1 = 0; $count1 &#60;= 9; $count1++) { for ($count2 = 0; $count2 &#60;= 9; $count2++) { $num=$count1*$count2;   #multiply the numbers together print &#8220;$num &#8220;; if ($num&#60;10) { print &#8221; &#8220;; #print an extra space if needed so the table lines up } } print [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Print out a multiplication table from 0 to 9. </strong></p>
<p><strong></strong><br />
for ($count1 = 0; $count1 &lt;= 9; $count1++)<br />
{<br />
for ($count2 = 0; $count2 &lt;= 9; $count2++)<br />
{<br />
$num=$count1*$count2;   #multiply the numbers together<br />
print &#8220;$num &#8220;;<br />
if ($num&lt;10)<br />
{<br />
print &#8221; &#8220;; #print an extra space if needed so the table lines up<br />
}<br />
}<br />
print &#8220;\n&#8221;; # go to the next line of the table<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dogmawglass.com/2010/07/24/perl-multiplication-table-with-nested-for-loops/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Perl &#8211; display file contents</title>
		<link>http://blog.dogmawglass.com/2010/07/23/perl-display-file-contents/</link>
		<comments>http://blog.dogmawglass.com/2010/07/23/perl-display-file-contents/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 03:01:26 +0000</pubDate>
		<dc:creator>johoff</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[print]]></category>

		<guid isPermaLink="false">http://blog.dogmawglass.com/?p=649</guid>
		<description><![CDATA[Write a program to read in a filename from STDIN, then open that file and display its contents with each line preceded by the filename and a colon. For example, if fred was read in, and the file fred consisted of the three lines aaa, bbb, and ccc, you would see fred:aaa,fred:bbb, and fred:ccc. print [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Write a program to read in a filename from STDIN, then open that file and display its contents with each line preceded by the filename and a colon. For example, if fred was read in, and the file fred consisted of the three lines aaa, bbb, and ccc, you would see fred:aaa,fred:bbb, and fred:ccc.</strong><br />
print &#8220;Enter filename for input: &#8220;;<br />
chomp($input_name = &lt;STDIN&gt;);<br />
open (INPUT, &#8220;$input_name&#8221;) or die &#8220;Can&#8217;t Open Input File: $input_name\n&#8221;;        #open input file</p>
<p>@input_file = &lt;INPUT&gt;;  #read the input file into an array<br />
foreach $line (@input_file) #go through it line by line<br />
{<br />
print &#8220;$input_name: $line&#8221;;   # print file_name: line_from_file<br />
}</p>
<p>close (input_file);  # close the input file</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dogmawglass.com/2010/07/23/perl-display-file-contents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl &#8211; string replacement in a file</title>
		<link>http://blog.dogmawglass.com/2010/07/22/perl-string-replacement-in-a-file/</link>
		<comments>http://blog.dogmawglass.com/2010/07/22/perl-string-replacement-in-a-file/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 02:59:43 +0000</pubDate>
		<dc:creator>johoff</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[word]]></category>

		<guid isPermaLink="false">http://blog.dogmawglass.com/?p=647</guid>
		<description><![CDATA[Write a program that prompts for an input filename, an output filename, a search pattern, and a replacement string, and replaces all occurrences of the search pattern with the replacement string while copying the input file to the output file. print &#8220;Enter filename for input: &#8220;; chomp($input_name = &#60;STDIN&#62;); print &#8220;Enter filename for output: &#8220;; [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Write a program that prompts for an input filename, an output filename, a search pattern, and a replacement string, and replaces all occurrences of the search pattern with the replacement string while copying the input file to the output file. </strong><br />
print &#8220;Enter filename for input: &#8220;;<br />
chomp($input_name = &lt;STDIN&gt;);<br />
print &#8220;Enter filename for output: &#8220;;<br />
chomp($output_name = &lt;STDIN&gt;);</p>
<p>open (OUTPUT, &#8220;&gt;&gt;$output_name&#8221;) or die &#8220;Can&#8217;t Open Output File: $output_name\n&#8221;;<br />
#open the output file<br />
open (INPUT, &#8220;$input_name&#8221;) or die &#8220;Can&#8217;t Open Input File: $input_name\n&#8221;;        #open input file</p>
<p>print &#8220;Enter word you are looking for: &#8220;;<br />
chomp($word1 = &lt;STDIN&gt;);<br />
print &#8220;Enter what you want to replace it with: &#8220;;<br />
chomp($word2 = &lt;STDIN&gt;);</p>
<p>@input_file = &lt;INPUT&gt;;  #read the input file into an array<br />
foreach $line (@input_file) #go through it line by line<br />
{<br />
$line =~ s/$word1/$word2/gi; #do a replacement in the line of word2 for word1<br />
print OUTPUT $line;   # put the replaced line in the output file<br />
}</p>
<p>close (input_file);  # close the input file<br />
close (output_file);  # close the output file</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dogmawglass.com/2010/07/22/perl-string-replacement-in-a-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl &#8211; word count in a file</title>
		<link>http://blog.dogmawglass.com/2010/07/21/perl-word-count-in-a-file/</link>
		<comments>http://blog.dogmawglass.com/2010/07/21/perl-word-count-in-a-file/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 02:58:04 +0000</pubDate>
		<dc:creator>johoff</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[count]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[word]]></category>

		<guid isPermaLink="false">http://blog.dogmawglass.com/?p=645</guid>
		<description><![CDATA[Write a program that reads a series of words (with one word per line) until end-of-input, then print a summary of how many times each word was seen. (Hint: remember that when an undefined value is used as if it were a number, Perl automatically converts it to 0. If the input words were apple, [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Write a program that reads a series of words (with one word per line) until end-of-input, then print a summary of how many times each word was seen. (Hint: remember that when an undefined value is used as if it were a number, Perl automatically converts it to 0. If the input words were apple, pear, grape, plum, apple, pear, and apple (all on separate lines), the output should tell us that apple was seen 3 times.</strong></p>
<p>print &#8220;This will count the number of instances of a word \n&#8221;;<br />
print &#8220;Enter one word per line. \n&#8221;;<br />
print &#8220;When you are done, hit cntrl-D TWICE \n&#8221;;</p>
<p>my %count=();<br />
while (read(STDIN, $_, 4095) and $_.=&lt;STDIN&gt;)<br />
{<br />
tr/A-Za-z/ /cs;<br />
++$count{$_} foreach split(&#8216; &#8216;, lc $_);<br />
}<br />
my @lines=();<br />
my ($w, $c);<br />
print &#8220;Here is the list of words with the number of times it appears: \n&#8221;;<br />
push(@lines, sprintf(&#8220;%7d\t%s\n&#8221;, $c, $w)) while (($w, $c) = each(%count));<br />
print sort { $b cmp $a } @lines;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dogmawglass.com/2010/07/21/perl-word-count-in-a-file/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Perl &#8211; a simple Hash Table</title>
		<link>http://blog.dogmawglass.com/2010/07/20/perl-a-simple-hash-table/</link>
		<comments>http://blog.dogmawglass.com/2010/07/20/perl-a-simple-hash-table/#comments</comments>
		<pubDate>Wed, 21 Jul 2010 02:56:24 +0000</pubDate>
		<dc:creator>johoff</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[hash]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[table]]></category>

		<guid isPermaLink="false">http://blog.dogmawglass.com/?p=643</guid>
		<description><![CDATA[Store your important phone numbers in a hash table.  Write a program to look up numbers by the person’s name. %phoneNumbers = ();     #set up the hash table empty %phoneNumbers = (&#8220;Anne&#8221;, &#8220;432566&#8243;, &#8220;Paul&#8221;, &#8220;231275&#8243;, &#8220;Marie&#8221;, &#8220;299302&#8243;);  # put phone numbers in the hash table print &#8220;Enter the name you wish to look for: [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Store your important phone numbers in a hash table.  Write a program to look up numbers by the person’s name.</strong><br />
%phoneNumbers = ();     #set up the hash table empty<br />
%phoneNumbers = (&#8220;Anne&#8221;, &#8220;432566&#8243;, &#8220;Paul&#8221;, &#8220;231275&#8243;, &#8220;Marie&#8221;,<br />
&#8220;299302&#8243;);  # put phone numbers in the hash table<br />
print &#8220;Enter the name you wish to look for: &#8220;;  #get the name you want to look for<br />
chomp($name=&lt;STDIN&gt;);<br />
$found=0;<br />
while (($key, $value) = each %phoneNumbers)  # look through the hash table<br />
{<br />
if ($key eq $name)    # if the name matches one in the table, print it out along with<br />
# the phone number<br />
{<br />
$found=1;<br />
print &#8220;$key has the phone number $phoneNumbers{$key}\n&#8221;;<br />
}<br />
}<br />
if ($found==0) { print &#8220;$name was not found in the list&#8221;;}     # if the name wasn’t found, say so</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dogmawglass.com/2010/07/20/perl-a-simple-hash-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl &#8211; array</title>
		<link>http://blog.dogmawglass.com/2010/07/17/perl-array/</link>
		<comments>http://blog.dogmawglass.com/2010/07/17/perl-array/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 02:55:09 +0000</pubDate>
		<dc:creator>johoff</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[alphabetical order]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[sort]]></category>

		<guid isPermaLink="false">http://blog.dogmawglass.com/?p=641</guid>
		<description><![CDATA[Write a program that asks a user for five groceries, and then store them (using one of the stack operations. (Either push or unshift.)) in an array called @grocerylist and prints them out in alphabetical order. print &#8220;Input your first grocery item: &#8220;;    # user prompt chomp($item1 = &#60;STDIN&#62;);      # inputs the word and [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Write a program that asks a user for five groceries, and then store them (using one of the stack operations. (Either push or unshift.)) in an array called @grocerylist and prints them out in alphabetical order.</strong></p>
<p>print &#8220;Input your first grocery item: &#8220;;    # user prompt<br />
chomp($item1 = &lt;STDIN&gt;);      # inputs the word and gets rid of the newline<br />
print &#8220;Input your second grocery item: &#8220;;    # user prompt<br />
chomp($item2 = &lt;STDIN&gt;);      # inputs the word and gets rid of the newline<br />
print &#8220;Input your third grocery item: &#8220;;    # user prompt<br />
chomp($item3 = &lt;STDIN&gt;);      # inputs the word and gets rid of the newline<br />
print &#8220;Input your fourth grocery item: &#8220;;    # user prompt<br />
chomp($item4 = &lt;STDIN&gt;);      # inputs the word and gets rid of the newline<br />
print &#8220;Input your last grocery item: &#8220;;    # user prompt<br />
chomp($item5 = &lt;STDIN&gt;);      # inputs the word and gets rid of the newline</p>
<p>push(@grocerylist, $item1, $item2, $item3, $item4, $item5);  #put the items in the array</p>
<p>@alphagrocery = sort(@grocerylist); #sort the array in alphabetical order<br />
print &#8220;What&#8217;s on the list in alphabetical order:\n&#8221;;<br />
foreach (@alphagrocery)<br />
{<br />
print $_ . &#8220;\n&#8221;; # print the sorted groceries<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dogmawglass.com/2010/07/17/perl-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl &#8211; another while loop</title>
		<link>http://blog.dogmawglass.com/2010/07/16/perl-another-while-loop/</link>
		<comments>http://blog.dogmawglass.com/2010/07/16/perl-another-while-loop/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 02:53:58 +0000</pubDate>
		<dc:creator>johoff</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[while loop]]></category>

		<guid isPermaLink="false">http://blog.dogmawglass.com/?p=639</guid>
		<description><![CDATA[Write a program that prints all the numbers from 1 to 100. Your program should have much fewer than 100 lines of code! – there are a couple of ways to do this. $count = 1; while ($count&#60;=100) { print &#8220;$count &#8220;; $count++; }]]></description>
			<content:encoded><![CDATA[<p><strong>Write a program that prints all the numbers from 1 to 100. Your program should have much fewer than 100 lines of code! – there are a couple of ways to do this.</strong><br />
$count = 1;<br />
while ($count&lt;=100)<br />
{<br />
print &#8220;$count &#8220;;<br />
$count++;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dogmawglass.com/2010/07/16/perl-another-while-loop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl basic WHILE loop</title>
		<link>http://blog.dogmawglass.com/2010/07/16/perl-basic-while-loop/</link>
		<comments>http://blog.dogmawglass.com/2010/07/16/perl-basic-while-loop/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 00:50:35 +0000</pubDate>
		<dc:creator>johoff</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[while loop]]></category>

		<guid isPermaLink="false">http://blog.dogmawglass.com/?p=637</guid>
		<description><![CDATA[Write a while() loop that counts from 0 to 15 by threes and prints out the number that it is on. $count = 0; while ($count&#60;=15) { print &#8220;$count &#8220;; $count += 3; }]]></description>
			<content:encoded><![CDATA[<p><strong>Write a while() loop that counts from 0 to 15 by threes and prints out the number that it is on. </strong></p>
<p>$count = 0;<br />
while ($count&lt;=15)<br />
{<br />
print &#8220;$count &#8220;;<br />
$count += 3;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dogmawglass.com/2010/07/16/perl-basic-while-loop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Perl basic FOR loop</title>
		<link>http://blog.dogmawglass.com/2010/07/15/perl-basic-for-loop/</link>
		<comments>http://blog.dogmawglass.com/2010/07/15/perl-basic-for-loop/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 00:49:15 +0000</pubDate>
		<dc:creator>johoff</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://blog.dogmawglass.com/?p=635</guid>
		<description><![CDATA[Write a for() loop that counts from 0 to 15 by twos and prints out the number that its on. for ($count = 0; $count &#60;= 15; $count+=2) { print &#8220;$count &#8220;; }]]></description>
			<content:encoded><![CDATA[<p><strong>Write a for() loop that counts from 0 to 15 by twos and prints out the number that its on. </strong><br />
for ($count = 0; $count &lt;= 15; $count+=2)<br />
{<br />
print &#8220;$count &#8220;;<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.dogmawglass.com/2010/07/15/perl-basic-for-loop/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
