<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" data-hsystem="true"></head>
<body><style>p{margin: 0;padding: 0;}

</style>
<p>Doug,</p>
<p> </p>
<p>Thanks for the help. This got me where I need to go.<br><br>On Sun, 11 Oct
2015 16:09:24 -0500, Doug Bell <madcityzen@gmail.com> wrote:</p>
<blockquote style="border-left: 2px solid #000000; padding-right: 0px;
padding-left: 5px; margin-left: 5px; margin-right: 0px;">What you have there
should work. You could also simplify it with loops or slices:<br><br> for my
$name_key ( qw( FName LName Nickname ) ) {<br> $validtn_hash{ Name }{ $name_key
} = $input_hash->{ $name_key };<br> }<br><br> # OR<br> $validtn_hash{ Name }{
$_ } = $input_hash->{ $_ } for qw( FName LName Nickname );<br><br> # OR<br>
@{ $validtn_hash{ Name } }{qw( FName LName Nickname )} = @{ $input_hash }{qw(
FName LName Nickname )};<br><br><br> Doug Bell<br>
madcityzen@gmail.com<br><br><br><br> > On Oct 11, 2015, at 3:07 PM,
richard@rushlogistics.com wrote:<br> > <br> > If I have the following hash
reference:<br> > <br> > my $input_hash = { <br> > <br> > Hometown
=> 'Chicago', <br> > FName => 'Jim', <br> > LName => 'Brown',<br>
> Nickname => 'Jimbo',<br> > <br> > };<br> > <br> > Is there a
way that I can create a multimensional hash like they've done here
http://perlmaven.com/multi-dimensional-hashes<br> > <br> > But instead
have it structured with the input_hash's key name as one of the dimensions? So
that I would have:<br> > <br> > $validtn_hash{class}{input_hash_key} =
input_hash value; # where City and Name are examples of classes<br> > <br>
> $validtn_hash{"City"}{Hometown} = $input_hash->{Hometown};<br> >
$validtn_hash{"Name"}{FName} = $input_hash->{FName};<br> >
$validtn_hash{"Name"}{LName} = $input_hash->{LName};<br> >
$validtn_hash{"Name"}{Nickname} = $input_hash->{Nickname};<br> > <br> >
Or is this even possible? <br> > <br> > Thanks<br> > <br> >
_______________________________________________<br> > Chicago-talk mailing
list<br> > Chicago-talk@pm.org<br> >
http://mail.pm.org/mailman/listinfo/chicago-talk<br><br>
_______________________________________________<br> Chicago-talk mailing
list<br> Chicago-talk@pm.org<br>
http://mail.pm.org/mailman/listinfo/chicago-talk<br>
</blockquote>
<p><br><br></p>

</body>
</html>