Code:
string $selObj[] = `ls -sl`; if ($selObj[0] == "") error "No object has been selected"; else { select $selObj[0]; int $numEdges[] = `polyEvaluate -e`; select -r ($selObj[0] + ".e[0:" + ($numEdges[0] -1) + "]"); select -cl; select $selObj[0]; print "Edges Cleared!\n"; }