How do I convert an item from an array into a string variable
I'm trying to get a string array containing the selected objects ( $objectsArray[ ] ), and then I would like to only get the first item from that array and put it into a regular string variable ( $onlyFirstObject )
string $objectsArray[] = `ls -selection`;
string $onlyFirstObject = $curvesArray[0];
This doesn't work. What's the correct way to get only the first item in a string array, and store it in a string variable?