Also, I've read the *perldsc* perldoc and it didn't help undo my confusion.
Mathew Mathew Snyder wrote: > I have a problem printing out a hash. This is the script I'm working with: > #!/usr/bin/perl > > use warnings; > use strict; > use lib '/usr/local/rt-3.6.3/lib'; > use lib '/usr/local/rt-3.6.3/local/lib'; > use RT; > use RT::Tickets; > > RT::LoadConfig(); > RT::Init(); > > my $tix = new RT::Tickets(RT::SystemUser); > $tix->FromSQL('Queue = "CustomerCare" OR Status = "resolved" OR Status = > "open"'); > > my $timeworked = {}; > my %env; > > while (my $ticket = $tix->Next) { > my $customer = $ticket->FirstCustomFieldValue('Environment'); > unless ($customer) {warn "warning" . $ticket->id. "no profile"; next} > my $transactions = $ticket->Transactions; > while (my $transaction = $transactions->Next) { > next unless ($transaction->TimeTaken); > $timeworked = > $env{$transaction->Creator}{$transaction->TimeTaken}; > print "Working on " . $ticket->id . "\n"; > foreach my $key (keys %$env) { > print $key . " -> " . $env{$key} . "\n"; > } > } > > } > > When I print the hash all I get is a reference. I can't seem to figure out > how > to get the actual contents. I've tried using \$, %$, %{$env} and %{env}. > Some > cause errors and some simply print out the reference. I'm not even sure I'm > doing the "$timeworked = " line correctly. Can someone help me out with this > please? > > Thanks > Mathew > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/