]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/Tools.pm
Tools.pm: do not ignore "0" in split_list
[pve-common.git] / src / PVE / Tools.pm
index 6254b2e653624880ab67fd35fcb581303caa6463..accf6539da94d2b5d5b6f4539310fe5c4d526c7e 100644 (file)
@@ -640,7 +640,7 @@ sub pipe_socket_to_command  {
 }
 
 sub split_list {
-    my $listtxt = shift || '';
+    my $listtxt = shift // '';
 
     return split (/\0/, $listtxt) if $listtxt =~ m/\0/;
 
@@ -670,7 +670,7 @@ sub template_replace {
     return $tmpl if !$tmpl;
 
     my $res = '';
-    while ($tmpl =~ m/([^{]+)?({([^}]+)})?/g) {
+    while ($tmpl =~ m/([^{]+)?(\{([^}]+)\})?/g) {
        $res .= $1 if $1;
        $res .= ($data->{$3} || '-') if $2;
     }