Changeset 10099 in ntrip for trunk/BNC/scripts
- Timestamp:
- Jun 17, 2023, 10:56:07 PM (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/scripts/Common.pm
r9747 r10099 54 54 eval { mkpath($dir) }; 55 55 if ($@) { 56 warn ("Could not create path [$dir]: $@");56 warn ("Could not create path [$dir]: $@"); 57 57 return 0; 58 58 } … … 129 129 # could not replace -> append 130 130 blurt( "$newPos\n", $idxFil, { append => 1 } ); 131 # my $INP; 132 # if ( !open ( $INP, ">>", $idxFil ) ) { 133 # ERROR("Could not append file [$idxFil]: $!"); 134 # return 0; 135 # } 136 # print $INP "$newPos\n"; 137 # close ($INP); 131 132 # my $INP; 133 # if ( !open ( $INP, ">>", $idxFil ) ) { 134 # ERROR("Could not append file [$idxFil]: $!"); 135 # return 0; 136 # } 137 # print $INP "$newPos\n"; 138 # close ($INP); 138 139 } 139 140 } … … 141 142 # initial write 142 143 blurt( "$newPos\n", $idxFil ); 144 143 145 #writeTextInFile( $idxFil, "$newPos\n" ); 144 146 } … … 230 232 if ( !exists $rcd->{'tags'}->{$_} ) { 231 233 $err++; 234 232 235 #next; # ? 233 236 } … … 238 241 239 242 # Fields 240 while ( my ( $k, $v ) = each%{ $rcd->{'fields'} } ) {241 if ( ! defined $v) {243 foreach ( sort { lc ($a) cmp lc ($b) } keys %{ $rcd->{'fields'} } ) { 244 if ( !exists $rcd->{'fields'}->{$_} ) { 242 245 $err++; 243 } 244 $str .= $k . "=" . $v . ","; 246 247 #next; # ? 248 } 249 $str .= $_ . "=" . $rcd->{'fields'}->{$_} . ","; 245 250 } 246 251 chop $str;
Note:
See TracChangeset
for help on using the changeset viewer.