Using .csv data to generate objects in level

doesnt look like the script was formatted properly, here is it again:

//STEP 1: // Define Your File Path
//folder must exist for it to save the file.
string $filePath = "C:/mel/ue4CSV_test001.txt";


//STEP 2: // select all the objects you want to send then run this:
$fileId = `fopen $filePath "w"`;
string $sel[] = `ls -sl`;
int $count = `size $sel`;
for ($i=0; $i<$count; $i++)
{
    select $sel[$i];
    string $transform;
    vector $p = `xform -q -ws -t`;
    vector $r = `xform -q -ws -ro`;
    vector $s = `xform -q -ws -s`;
    $transform = ($p.x + "," + $p.y + "," + $p.z + "," + $r.x + "," + $r.y + "," + $r.z + "," + $s.x + "," + $s.y + "," + $s.z);
    
    fprint $fileId ($transform + "\n");
}
fclose $fileId;