http://qs1969.pair.com?node_id=1227308


in reply to Re^3: Read CSV with column mapping
in thread Read CSV with column mapping

I have tried adding if conditions as shown in following code but it is not skipping to add comment line and empty line. Am I doing something wrong?

while(my $colref = $csv->getline ($csv_fh)) { if (scalar(@$colref) =~ /^#/) { last; } if (scalar(@$colref) =~ /^s+$/) { last; } $output_hash{shift @{$colref}} = $colref; }
config file
#ksjlasjda abc xyz,10 xyz pqr,2 pqr stq,0.1