Try this:
$val = $properties{"fieldName"};
# To print the owner just use this:
print $properties{"owner"}." whatever else\n";
Here's a link to the docs (in case you don't have it already).
http://arsinfo.cit.buffalo.edu/perl/manual/ds_field_hash.html
Hope this helps.
(BTW: Also, your question probably belongs on the ARSperl mailing list.)
Ross
-----Original Message-----
From: MECKLIN, JOE (ASI) [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 14, 2002 12:44 PM
To: '[EMAIL PROTECTED]'
Subject: reference to hash
All,
I've been fighting this for a while and I'm afraid I can't see the trees for
the forest now (yes, I know that's bass-ackwards)...
I'm using ARS.pm to access the Remedy product. One function -
ars_GetField() - returns a reference to a hash, and what I've been trying to
read isn't sinking in as to how to extract that data.
Generally:
use ARS;
$server = "server.base.name.com";
$user = "login";
$password = "password";
$schema = "Remedy Form Name";
($connect_id = ars_Login($server, $userid, $password)) || die "Can't
login:$ars_errstr\n";
(%properties = ars_GetField($connect_id, $schema, 8)) || die
$ars_errstr;
8 in the line immediately above is a numerical value referencing a field
(also called "clli"), for those not familiar with the ARS product. I've
shotgunned numerous paths, this being the most recent (unsuccessful)
technique:
$r = ${$properties};
foreach $k (keys %properties)
{
$val = @{$properties}{"fieldName"};
print %$k . ", val = " . $val . "R = " .
@{$properties}{"owner"} . "\n";
}
fieldName and owner are both actual entries (each a string value) in the
Field Properties Structure ars_GetField() supposedly returns. How do
extract the values in this reference? I've been reading Programming Perl
and it's just not sinking in now.
Thanks in advance,
Joe
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]