in reply to Sub Routine calls

There is no reason to use a temporary file. Just assign the results of the `naviseccli ...` into an array and loop through that array. Just replace the

my $navicmd = `naviseccli -address $spa -user $nviusr -password $nvipw +d -scope global clone -listclone -Name "$name" -cloneid $copies{$clTy +p} -Clonestate -PercentSynced`;
by
my @navicmd = `naviseccli -address $spa -user $nviusr -password $nvipw +d -scope global clone -listclone -Name "$name" -cloneid $copies{$clTy +p} -Clonestate -PercentSynced`;
remove all the file fiddling and replace
while (<FILE>) {
by
foreach (@navicmd) {
You might also want to rename that variable, because it doesn't contain any command, but rather the output or results of some command.

Jenda
Enoch was right!
Enjoy the last years of Rome.