All pastes #625477 Raw Edit

Untitled

public text v1 · immutable
·published 2007-07-18 23:24 UTC
rendered paste body
use Business::UPS;

%t = UPStrack("1Z2X98306849329617");
$t{error} and die "ERROR: $t{error}";
      
print "This package is $t{'Current Status'}\n"; # 'Delivered' or 
                                                # 'In-transit'
print "More info:\n";
foreach $key (keys %t) {
  print "KEY: $key = $t{$key}\n";
}
%activities = %{$t{'Scanning'}};
print "Package activity:\n";
for (my $num = $t{'Activity Count'}; $num > 0; $num--)
{
      print "-- ITEM $num --\n";
      foreach $newkey (keys %{$activities{$num}})
      {
              print "$newkey: $activities{$num}{$newkey}\n";
      }
}