... try { # Try and find some tickets @search = $rt->search(type => 'ticket', query => "id = '3188'"); } catch RT::Client::REST::UnauthorizedActionException with { print STDERR "You are not authorized to execute this search.\n"; } catch RT::Client::REST::Exception with { # something went wrong. die "Problem trying to execute a search: ", shift->message; }; exit 0 if (scalar(@search) < 1); foreach $id (@search) { # Retrieve each ticket from RT $ticket = $rt->show(type => 'ticket', id => $id); @attachment_ids = $rt->get_attachment_ids (id => $id); foreach(@attachment_ids) { print "Att_id: $_\n"; $att = $rt->get_attachment (parent_id => $id, id => $_); print Dumper($att); print "\n"; } } #### Use of uninitialized value in split at /usr/lib/perl5/site_perl/5.8.8/RT/Client/REST/Forms.pm line 38. Can't use an undefined value as an ARRAY reference at /usr/lib/perl5/site_perl/5.8.8/RT/Client/REST.pm line 167.