projects
/
virtual-ldap
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73a02aa
)
strip spaces
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 15 Mar 2009 20:39:55 +0000
(20:39 +0000)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 15 Mar 2009 20:39:55 +0000
(20:39 +0000)
bin/csv2yaml.pl
patch
|
blob
|
history
diff --git
a/bin/csv2yaml.pl
b/bin/csv2yaml.pl
index
9d0f9ad
..
a40eb3e
100755
(executable)
--- a/
bin/csv2yaml.pl
+++ b/
bin/csv2yaml.pl
@@
-42,6
+42,8
@@
foreach my $line ( split(/\r?\n/, $csv) ) {
my $v = $fields[$_];
$v =~ s{\s*#\s*$}{};
+ $v =~ s{^\s+}{};
+ $v =~ s{\s+$}{};
if ( $v =~ m{#} ) {
my @v = split(/\s*#\s*/, $v);