I have created a routine to read the CSV file as a hash but I don't get how to compare to the existing id. Here is my piece of code. Can you please help how to do the comparison? Thank you.
#!/usr/bin/perl use strict; use warnings; use Text::CSV; use Data::Dumper qw(Dumper); my $file = 'test_data.csv'; csv_hash($file); sub csv_hash { my ($filename) = @_; my $csv = Text::CSV->new ({binary => 1,auto_diag => 1,sep_char => + ';'}); open(my $data, '<:encoding(utf8)', $filename) or die "Could not op +en '$filename' $!\n"; my $header = $csv->getline($data); $csv->column_names($header); while (my $row = $csv->getline_hr($data)) { print(Dumper $row); } close $data; }
In reply to Re^4: Update XML Values using two primary keys
by pratikpooja
in thread Update XML Values using two primary keys
by pratikpooja
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |