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
bymy $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 replacemy @navicmd = `naviseccli -address $spa -user $nviusr -password $nvipw +d -scope global clone -listclone -Name "$name" -cloneid $copies{$clTy +p} -Clonestate -PercentSynced`;
bywhile (<FILE>) {
You might also want to rename that variable, because it doesn't contain any command, but rather the output or results of some command.foreach (@navicmd) {
Jenda
Enoch was right!
Enjoy the last years of Rome.
In reply to Re: Sub Routine calls
by Jenda
in thread Sub Routine calls
by mrras25
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |