<div dir="ltr">In this case, $client is a reference to a hash. You can't print it directly, but you can print the contents using Data::Dumper.<div><br></div><div>I think this should work:</div><div><br></div><div><div><font face="monospace, monospace">use Data::Dumper;</font></div><div><font face="monospace, monospace">my $clientcustomfield = RT::CustomFieldValues->new($RT::SystemUser);</font></div><div><font face="monospace, monospace">$clientcustomfield->LimitToCustomField(45);</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">my $clients = $clientcustomfield;</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">while (my $client = $clients->Next ) {</font></div><div><font face="monospace, monospace"> print dumper $client;</font></div><div><font face="monospace, monospace"> print "\n";</font></div><div><font face="monospace, monospace">}</font></div></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace"><br></font></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 1, 2015 at 10:23 PM, Roman Massey <span dir="ltr"><<a href="mailto:romanmassey@gmail.com" target="_blank">romanmassey@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span>Hi Guys, Looking for some advice on a script to fetch list of a custom field’s values. At the moment it’s printing "RT::CustomFieldValue=HASH(0x91f22b0)”. I’m obviously missing something silly and would really appreciate a guru’s touch!<br></span><span><br><font face="Courier">my $clientcustomfield = RT::CustomFieldValues->new($RT::SystemUser);<br>$clientcustomfield->LimitToCustomField(45);<br><br>my $clients = $clientcustomfield;<br><br>while (my $client = $clients->Next ) {<br> print $client;<br> print "\n";<br>}</font><br></span><span><br></span><span><br></span><div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">—</div><span class="HOEnZb"><font color="#888888"><div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">Roman Massey</div></font></span></div></div>
</div>
<br></div></blockquote></div><br></div>