[BACK]Return to pta_import.pl CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / pta

Diff for /pta/pta_import.pl between version 1.7 and 1.8

version 1.7, 2020/11/10 17:30:31 version 1.8, 2020/11/10 17:42:32
Line 35  sub parse_import_file ($) {
Line 35  sub parse_import_file ($) {
                 chomp;                  chomp;
                 next if /^(?:#|$)/;                  next if /^(?:#|$)/;
                 my $line = $_;                  my $line = $_;
                 if (/^ACCOUNT/) {                  if (/^ACCOUNT\s+(\d+)$/) {
                         $csv_account = $line;                          $csv_account and die "duplicate ACCOUNT line: $1";
                         $csv_account =~ s/^ACCOUNT\s+(\d+)$/$1/;                          $csv_account = $1;
                         next;                          next;
                 }                  }
                 s/^(.*),\s+(\d+)\s+(\S+)// or                  s/^(.*),\s+(\d+)\s+(\S+)// or
Line 50  sub parse_import_file ($) {
Line 50  sub parse_import_file ($) {
                 $accounts{$reg} = $account;                  $accounts{$reg} = $account;
         }          }
         close $in;          close $in;
         $csv_account or die "CSV account not defined in $fn";          $csv_account or die "no ACCOUNT line in $fn";
         return (\%bookings, \%accounts, \@compiled, $csv_account, $import_type);          return (\%bookings, \%accounts, \@compiled, $csv_account, $import_type);
 }  }
   

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

CVSweb