Advertisement
Guest User

Untitled

a guest
Dec 11th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. my $csv = Text::CSV_XS->new();
  2. my @all_costs = all_shipping_costs();
  3.  
  4. foreach my $info (@all_costs)
  5. {
  6.  
  7. foreach my $rate (@{$info->{'rates'}})
  8. {
  9. # print Dumper $rate;
  10.  
  11. $csv->say(*STDOUT, [$info->{'country'}.", ".$info->{'postcode'}.", ".$info->{'label'}.", ".$rate->{'service_code'}.", ".$rate->{'total_price'}.", '".$rate->{'service_name'}.", C:".$info->{'chilled'}.", F:".$info->{'fresh'}.", FR:".$info->{'frozen'}]);
  12.  
  13. }
  14. }
  15.  
  16. die;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement