X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=blobdiff_plain;f=src%2FPVE%2FTools.pm;h=accf6539da94d2b5d5b6f4539310fe5c4d526c7e;hp=6254b2e653624880ab67fd35fcb581303caa6463;hb=0a3de87e0f68078652ca3293c1bd1cc377c27f9d;hpb=fb3a1b2985a35eb7e2630fbe4ddd6981f81d0b98 diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm index 6254b2e..accf653 100644 --- a/src/PVE/Tools.pm +++ b/src/PVE/Tools.pm @@ -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; }