version 1.1, 2020/10/31 01:02:57 |
version 1.2, 2020/11/01 20:12:08 |
Line 57 sub import_chase_credit_card() { |
|
Line 57 sub import_chase_credit_card() { |
|
'Professional Services' => 'PRO', |
'Professional Services' => 'PRO', |
'Shopping' => 'SHOP' |
'Shopping' => 'SHOP' |
); |
); |
while (<CSV>) { |
while (<>) { |
chomp; |
chomp; |
my ($trans_date, $post_date, $description, $category, |
my ($trans_date, $post_date, $description, $category, |
$type, $amount) = split /,/; |
$type, $amount) = split /,/; |
Line 88 my $chase_credit_card_header = "Transaction Date,Post |
|
Line 88 my $chase_credit_card_header = "Transaction Date,Post |
|
"Description,Category,Type,Amount"; |
"Description,Category,Type,Amount"; |
my $firstLine; |
my $firstLine; |
|
|
open CSV, '<', $ARGV[0]; |
chomp($firstLine = <>); |
chomp($firstLine = <CSV>); |
|
if ($firstLine eq $chase_credit_card_header) { |
if ($firstLine eq $chase_credit_card_header) { |
import_chase_credit_card; |
import_chase_credit_card; |
} else { |
} else { |
print "Undefined bank header\n"; |
print "Undefined bank header\n"; |
} |
} |
close CSV; |
|