We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26fbb65 commit e302595Copy full SHA for e302595
file2ldif.pl
@@ -228,6 +228,7 @@ sub replace_value {
228
my $sub;
229
my $attr;
230
my $value;
231
+ my @result;
232
233
# Check subroutine presence
234
if ( $key =~ m/\((.*)\)(.*)/ ) {
@@ -247,14 +248,18 @@ sub replace_value {
247
248
249
foreach my $val (@$value) {
250
251
+ my $safe_val = $val;
252
+
253
# Trim begin and end whitespaces
- $val =~ s/^\s+|\s+$//g;
254
+ $safe_val =~ s/^\s+|\s+$//g;
255
256
# Apply subroutine if any
- $val = &apply_sub( $val, $sub ) if ($sub);
257
+ $safe_val = &apply_sub( $val, $sub ) if ($sub);
258
259
+ push @result, $safe_val;
260
}
261
- return $value;
262
+ return \@result;
263
264
265
# Create the new values
0 commit comments