I have a nested hashref. At some point in this hashref, the key
tz has a hashref as its value. One key in this hashref is
spans. I want this hashref to not be printed or truncated
to maybe 20 characters max. How can I use
Data::Dump or something else to get a dump of the whole
structure but with this one key greatly reduced in output amount? The
docs to Data::Dump::Filtered are opaque to me. Here's a sample
of my data structure:
$VAR6 = {
'stops' => [
{
'destination' => {
'dt' => bless(
{
'local_rd_secs' => 54212,
'local_rd_days' => 734444,
'locale' => bless(
{
'default_time_format_length' => 'mediu
+m',
'native_language' => 'Engli
+sh',
'native_territory' => 'Unite
+d States',
'native_complete_name' =>
'English United States',
'en_language' => 'Engli
+sh',
'id' => 'en_US
+',
'default_date_format_length' => 'mediu
+m',
'en_complete_name' => 'English United
+States',
'en_territory' => 'United States'
},
'DateTime::Locale::en_US'
),
'rd_nanosecs' => 0,
'utc_rd_secs' => 68612,
'local_c' => {
'hour' => 15,
'second' => 32,
'month' => 11,
'quarter' => 4,
'day_of_year' => 307,
'day_of_quarter' => 34,
'minute' => 3,
'day' => 3,
'day_of_week' => 4,
'year' => 2011
},
'formatter' => undef,
'utc_year' => 2012,
'tz' => bless(
{
'last_offset' => -18000,
'spans' => [
[
'-1.#INF',
'59418032400',
'-1.#INF',
'59418014638',
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.