<?xml version="1.0" encoding="windows-1252"?>
<node id="968757" title="Re: Having trouble loading a hash with map" created="2012-05-03 10:38:52" updated="2012-05-03 10:38:52">
<type id="11">
note</type>
<author id="681898">
Utilitarian</author>
<data>
<field name="doctext">
&lt;c&gt;
#!/usr/bin/perl -w

use strict;
use Data::Dumper;
{
   local $/;  # unset the input record seperator in order to slurp the contents of STDIN
   my %hash;
   %hash = map { chomp; $_ =&gt; '1' } split /(\s+|\W+)/, &lt;&gt;;
}

print Dumper(\%hash); # because that's how it's supposed to be used ;)
&lt;/c&gt;

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-681898"&gt;
&lt;c&gt;print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."&lt;/c&gt;
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
968746</field>
<field name="parent_node">
968746</field>
</data>
</node>
