<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.0.6618.4">
<TITLE>Slice of HashOfHash</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT COLOR="#000080" FACE="Bookman Old Style">Given a Hash of a Hash is it possible to make a slice (I presume this will be another hash) of a subset of the HoH based upon a value, not the key?&nbsp; For example:</FONT></P>

<P><FONT COLOR="#000080" FACE="Bookman Old Style">my %HoH = (</FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp; flintstones =&gt; </FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp; {</FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; husband&nbsp;&nbsp; =&gt; &quot;fred&quot;,</FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pal&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &quot;barney&quot;,</FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp; },</FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp; jetsons =&gt; </FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp; {</FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; husband&nbsp;&nbsp; =&gt; &quot;george&quot;,</FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wife&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &quot;jane&quot;,</FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;his boy&quot; =&gt; &quot;elroy&quot;,&nbsp; # Key quotes needed.</FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp; },</FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp; jones =&gt; </FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp; {</FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; husband&nbsp;&nbsp; =&gt; &quot;fred&quot;,</FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wife&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &quot;linda&quot;,</FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp; },</FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp; simpsons =&gt; </FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp; {</FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; husband&nbsp;&nbsp; =&gt; &quot;homer&quot;,</FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; wife&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &quot;marge&quot;,</FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; kid&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =&gt; &quot;bart&quot;,</FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">&nbsp;&nbsp;&nbsp; }</FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">);</FONT>
</P>
<BR>

<P><FONT COLOR="#000080" FACE="Bookman Old Style">How can I make a new hash&nbsp; or loop through this HoH where husband = &quot;fred&quot;?&nbsp; </FONT>
</P>

<P><FONT COLOR="#000080" FACE="Bookman Old Style">I've been reading up on slices and printing hashes, but I can't seem to find an example or description on playing with HoH subsets.&nbsp; I've tried looping through the full HoH and adding those desired elements to a new HoH but that seems awkward and not quite right &amp; cumbersome.&nbsp; So I thought I'd ask ya'll for some help.</FONT></P>
<BR>

<P><FONT COLOR="#000080" FACE="Bookman Old Style">Cheers</FONT>

<BR><FONT COLOR="#000080" FACE="Bookman Old Style">Eric</FONT>
</P>
<BR>
<BR>

<PRE>******************************************************************************************
The information contained in this message, including attachments, may contain 
privileged or confidential information that is intended to be delivered only to the 
person identified above. If you are not the intended recipient, or the person 
responsible for delivering this message to the intended recipient, Alltel requests 
that you immediately notify the sender and asks that you do not read the message or its 
attachments, and that you delete them without copying or sending them to anyone else. 

</PRE></BODY>
</HTML>