http://qs321.pair.com?node_id=1210253


in reply to Parsing ldap attributes into a csv

To access a hash key, use curly brackets, not parens. This fixes the errors:
foreach my $key (keys %data) { print "key=$key, value=$data{$key}\n"; $data{$key} =~ s/(^|$)/"/g if $data{$key} =~ /,/; }