diff --git a/sandbox/convert_cftimeset_time_tz.pl b/sandbox/convert_cftimeset_time_tz.pl index 1ef694c2da..1818a516bb 100755 --- a/sandbox/convert_cftimeset_time_tz.pl +++ b/sandbox/convert_cftimeset_time_tz.pl @@ -238,7 +238,12 @@ sub process_file { open(my $fh, '<:encoding(UTF-8)', $filename) or die "Could not open file '$filename' $!"; my @rows = (); while (my $row = <$fh>) { - my @cleaned = map { $_ = s/NULL//gr =~ s/[\r\n]//gir; length($_) > 0 ? $_ : undef; } split(/,/,$row); + my @cleaned = map { + my $col = $_; + $col =~ s/NULL//g; + $col =~ s/[\r\n]//gi; + length $col > 0 ? $col : undef; + } split /,/, $row; push(@rows,{ id => $cleaned[0], time_set_id => $cleaned[1], diff --git a/t/api-rest/api-all.t b/t/api-rest/api-all.t index 70855cb298..8658966aa0 100644 --- a/t/api-rest/api-all.t +++ b/t/api-rest/api-all.t @@ -168,7 +168,15 @@ sub get_opt{#get $opt "test-groups" , ) or pod2usage(2); my @opt_keys = keys %$opt_in; - @{$opt}{ map{ s/\-/_/; } @opt_keys } = map {my $v = $opt_in->{$_}; $v={ map {$_=>1;} split(/[^[:alnum:]]+/,$v ) }; $v;} @opt_keys ; + @{$opt}{ map{ s/\-/_/r; } @opt_keys } = map { + my $v = $opt_in->{$_}; + $v = { + map { + $_ => 1; + } split(/[^[:alnum:]]+/, $v) + }; + $v; + } @opt_keys; print Dumper $opt; pod2usage(1) if $opt->{help}; pod2usage(1) unless( 1