To update $x->[0] after the rename, simply do $x->[0] = "USB" . $ext;.
In reply to Re: Rename File Name in Array by rhesa in thread Rename File Name in Array by drodinthe559