in reply to Re: Incomplete Output When Printing Hash
in thread Incomplete Output When Printing Hash

Tested your code. Unfortunately, it appears to have a problem since, at form submission, I am prompted with a download option (typical when there's some syntax issue). I'll tinker with it a bit and try to find the problem. (Maybe I copy/pasted something wrong and broke a line).

FAX

Okay ... modified your code ... here's the version that worked on Firefox 12.0 ...

use Data::Dumper; print "<html><meta http-equiv='content-type' content='text/html; chars +et=UTF-8'><BR/><BR/>"; print "<BR/>FtchObjtDets<BR/><BR/>"; print "<pre><BR/>"; print Dumper(\%myobjtdets); print "<BR/></pre><BR/>"; print "</html>"; exit;

Interesting that Firefox didn't like the newline syntax. Odd, that.

As for the output, Here 'tis. Again, a truncated list. Should I start drinking now?

$VAR1 = { 'prilabst' => 0, 'firstname' => 'Test', 'OBJECT.listmenuid' => '1650', 'odetnone' => 0, 'useremail' => 'test@test.com', 'clntobid' => '2', 'objtocat' => 'User', 'directory' => 'testuser', 'objtotyp' => 'Users', 'PROCESS.javaloc.Pages1' => 'Pages1', 'OBJECT.directory' => 'testuser', 'email' => 'test@test.com', 'usroidst' => 1, 'password' => 'test', 'clientid' => '2', 'PROCESS.javaloc.Menus1' => 'Menus1',

It's the little things that drive you crazy.

Still, thank you so very much for your interest and assistance.

FAX

Replies are listed 'Best First'.
Re^3: Incomplete Output When Printing Hash
by Monk::Thomas (Friar) on Aug 19, 2013 at 07:39 UTC

    To me this really looks like there's some value in the keys/values which keeps perl from outputting the whole page.

    A) You could try to print only the keys and see which one comes after 'PROCESS.javaloc.Menus1'. This ~should~ print all 63 keys.

    Then you can change 'sort keys' into 'reverse sort keys' and if there's only one malformed key/value then you should end up with 46 lines of output. If there are less then that, then there are more then one bogus keys/values.

    B) Can perl write files to the filesystem? Normally the answer is yes, but you seem to be working on a webserver and who knows how it's configured. (Maybe someone really nailed it down and prevents write access to the filesystem via a SELINUX policy...)

    If you can write, then you could print your results to a file and check the contents of that file. At least you don't have to worry about proper HTML entity escaping, browser bugs and possible buffering issues.

    C) Do you have access to the webserver error log? If not: Get familiar with eval and catching exceptions and try to catch the error message, why perl terminates abnormally. Hint: Try::Tiny is really nice. The documentation also explains what can go wrong with eval. But pay attention to the trailing semicolon 'try {} catch {};' <--- Strange stuff happens if you ommit it.