[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Wed Apr 28 09:35:27 2004 -->
- <!--x-from-r13: syrgpu ng culqrnhk.bet (Tyrgpu) -->
- <!--x-message-id: [email protected] -->
- <!--x-reference: 1083110917.17415.153.camel@devel -->
- <!--x-reference: [email protected] -->
- <!--x-reference: 1083126767.18748.179.camel@devel -->
- <!--x-reference: [email protected] -->
- <!--x-reference: 1083154714.17392.188.camel@devel -->
- <!--x-reference: [email protected] -->
- <!--x-reference: [email protected] -->
- <!--x-reference: [email protected] --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: [ale] Organizing data -->
- <li><em>date</em>: Wed Apr 28 09:35:27 2004</li>
- <li><em>from</em>: fletch at phydeaux.org (Fletch)</li>
- <li><em>in-reply-to</em>: <<a href="msg01229.html">[email protected]</a>> (Jason Etheridge's message of "Wed, 28 Apr 2004 09:19:41 -0400")</li>
- <li><em>references</em>: <1083110917.17415.153.camel@devel> <<a href="msg01212.html">[email protected]</a>> <1083126767.18748.179.camel@devel> <<a href="msg01220.html">[email protected]</a>> <1083154714.17392.188.camel@devel> <<a href="msg01224.html">[email protected]</a>> <<a href="msg01227.html">[email protected]</a>> <<a href="msg01229.html">[email protected]</a>></li>
- <li><em>subject</em>: [ale] Organizing data</li>
Jason> Fletch wrote:
>> Aieeeee, no. You mean: if( ref
>> $a_ref->{$ref}->{$ref2}->{$ref3} eq 'HASH' ) { ## Is hash ref }
>> else { ## Not hash ref
>> }
Jason> Coolness. I knew there had to be a function for that but
Jason> couldn't find it. :D
perldoc perlreftut, perldoc perlref.
Also something someone else pointed me at out-of-band is that the
Scalar::Util module has a `reftype' function that will return the
underlying type even for blessed objects:
reftype EXPR
If EXPR evaluates to a reference the type of the variable refer-
enced is returned. Otherwise "undef" is returned.
$type = reftype "string"; # undef
$type = reftype \$var; # SCALAR
$type = reftype []; # ARRAY
$obj = bless {}, "Foo";
$type = reftype $obj; # HASH
Granted an object would probably count as a value in the situation at
hand this wouldn't be what you'd want, but it's nice to know.
--
Fletch | "If you find my answers frightening, __`'/|
fletch at phydeaux.org | Vincent, you should cease askin' \ o.O'
| scary questions." -- Jules =(___)=
| U
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="01242" href="msg01242.html">[ale] Organizing data</a></strong>
<ul><li><em>From:</em> phasefx at magusaptus.com (Jason Etheridge)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="01209" href="msg01209.html">[ale] Organizing data</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Chris Fowler)</li></ul></li>
<li><strong><a name="01212" href="msg01212.html">[ale] Organizing data</a></strong>
<ul><li><em>From:</em> phasefx at magusaptus.com (Jason Etheridge)</li></ul></li>
<li><strong><a name="01213" href="msg01213.html">[ale] Organizing data</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Chris Fowler)</li></ul></li>
<li><strong><a name="01220" href="msg01220.html">[ale] Organizing data</a></strong>
<ul><li><em>From:</em> phasefx at magusaptus.com (Jason Etheridge)</li></ul></li>
<li><strong><a name="01221" href="msg01221.html">[ale] Organizing data</a></strong>
<ul><li><em>From:</em> cfowler at outpostsentinel.com (Chris Fowler)</li></ul></li>
<li><strong><a name="01224" href="msg01224.html">[ale] Organizing data</a></strong>
<ul><li><em>From:</em> phasefx at magusaptus.com (Jason Etheridge)</li></ul></li>
<li><strong><a name="01227" href="msg01227.html">[ale] Organizing data</a></strong>
<ul><li><em>From:</em> fletch at phydeaux.org (Fletch)</li></ul></li>
<li><strong><a name="01229" href="msg01229.html">[ale] Organizing data</a></strong>
<ul><li><em>From:</em> phasefx at magusaptus.com (Jason Etheridge)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg01235.html">[ale] Organizing data</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg01237.html">[ale] Organizing data</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg01229.html">[ale] Organizing data</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg01242.html">[ale] Organizing data</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#01236"><strong>Date</strong></a></li>
<li><a href="threads.html#01236"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>