note
kennethk
Assuming your post's whitespace has not been mangled (you should wrap output in <c><code></c> tags to avoid that), your issue is that the results from the external call ends with a newline character. This is easily fixed with [doc://chomp]:
<c>
$OLDVMDIR = "/sunstorage_kvm_images/kvm_images/images"; #Current Directory
$NEWVMDIR = "/sunstorage_kvm_images/kvm_images/images_new"; #Target (New) Directory
$VMSFX = "\-vda\.img"; #File suffix for each file
<snip>
@VMSHUT = `cat /tmp/virshlist_shutdown`;
chomp(@VMSHUT);
foreach $VMSHUT (@VMSHUT)
{
$VMFILE = $OLDVMDIR . $VMSHUT . $VMSFX;
print "$VMFILE $NEWVMDIR \n";
}
</c>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-712372">
<hr />
<p>#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.</p>
</div></div>
1008416
1008416