Dear Gentlemen and Ladies ... first, allow me to say that you are the "go to" resource for Perl information and I greatly appreciate this site. Also, this is my first question and, although I've read the guidelines, should I make a mistake in presenting my quandary, please don't interpret that as disrespect or an attempt to irritate you.

Sadly, my question is so simple, I hesitate to even ask. However, I cannot seem to find a solution or answer having Googled my brains out and, rather than turn to alcoholism, I thought I'd ask.

Here's the problem ... I'm printing a hash. Real simple. Done it a thousand times. The hash is generated from a SQL query (also done a thousand times). The query results in 63 hash elements ...

use strict; use warnings; my $count = keys %myobjtdets; - hash created from query print "$count"; - results in the number 63 exit;

Is that number correct? I counted the entries in the SQL table. It's 63. However, when I trawl through the hash, and print the entire result, I can only see about 19 or so entries. It's as though the list is truncated for some reason. It's insane. The same effect on Firefox 12.0 and various releases of IE, so the problem appears to be browser unrelated.

print "<html><meta http-equiv='content-type' content='text/html; chars +et=UTF-8'><BR/><BR/>"; print "<BR/>FtchObjtDets<BR/><BR/>"; foreach my $mykey (sort keys %myobjtdets) { print "$mykey - $myobjtde +ts{$mykey}<BR/>"; } print "</html>"; exit;

When this failed after numerous attempts, I noticed that some of you like the Data::Dumper::Simple module. Thinking that, perhaps, the issue is simply some odd inability of the browser to accept my entire list, I loaded that module and used it. Same result ... a truncated list.

What's in the data, you might ask? Nothing strange. Letters and numbers ... what many call alphanumeric characters. There's nothing in the hash list that, by and of itself, might cause the list to break. In case I missed something, however, I changed the data to basic numbers 1 .. 63 and recreated the same problem. What, pray tell, am I doing wrong? I do not believe I am a moron. However, I'm willing to confess that I am and stamp a red "M" on my forehead should you prove it.

Please help, I beg you for I am rapidly losing what remains of my mind.

Best, FAX

In reply to Incomplete Output When Printing Hash by FAX

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.