Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

hello Monks,

I have a problem at work that involves getting data from diary fields in a Remedy database. I'm using ARSPerl, which gets the data as an array of hashes. The ARSPerl documentation suggests a ways to get the data out of the hashes, but it doesn't work. I tried about 4 other things and they didn't work. One of these was from section 4.7.3 of Programming Perl.

I won't bore you with the details of every attempt. The last thing I tried looks like this:

my %hash = $diary_data[0]; my @temp1 = keys %hash; print "%hash\n"; foreach $temp2 (@temp1) { print "$temp2\n"; print "$hash{$temp2}\n"; }

This printed:

Reference found where even-sized list expected at ./ l +ine 200.<BR> Use of uninitialized value at ./ line 204.<BR> ARRAY(0x3c05dc)

(Line 200 starts with "my %hash" in the snippet above.

At this point, I'm wondering if there is a bug somewhere in this package? I have the same problem running this script on Solaris and on NT. I'm wondering about the error about an "even-sized list expected".

Thanks for the help.


In reply to Getting information from an array of hashes by chumley

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

  • 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.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2023-09-26 20:00 GMT
Find Nodes?
    Voting Booth?

    No recent polls found