diff options
author | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-17 11:01:05 +0800 |
---|---|---|
committer | ꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id> | 2021-07-17 11:01:05 +0800 |
commit | a391dff2fd6ee3300bc0b3f05a4e78d885625365 (patch) | |
tree | 92ea0df13209e4bf9926d1c8b72fc4ddeae17943 | |
parent | 4dd0770783a04fa650d07bffd1230598e76611c4 (diff) |
So the argument to shift is an array
-rw-r--r-- | config/pikul_order.tag | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/config/pikul_order.tag b/config/pikul_order.tag index 062d5ac..f3de13d 100644 --- a/config/pikul_order.tag +++ b/config/pikul_order.tag @@ -1,5 +1,7 @@ +=pod UserTag pikul_order Order order_number insurance UserTag pikul_order Routine <<EOR +=cut sub { my ($order_number, $insurance) = @_; my ($shipmode, $nitems, $subtotal, $fname, $lname, $address1, $address2, $city, $state, $phone_day) @@ -8,7 +10,7 @@ sub { FROM transactions WHERE code='$order_number'", wantarray => 1 })->[0]}; - my ($table, $service) = split(/_/, shift split(/ /, $shipmode)); + my ($table, $service) = split(/_/, shift @{split(/ /, $shipmode)}); my ($company, @provisions, $origin); if (substr($table, 0, 8) eq 'anteraja') { $company = $::Variable->{PIKUL_ANTERAJA}; |