if you want to perform an operation on multiple items, or multiple times you usually have to make a for...loop The Maya reference docs on this and other loops is actually very good so you should check out the section in "How to use MEL" > "Flow control"
but in summary, you do something like this:
string $selNurb[] = ls -sl
;
for ($item in $selNurb)
{
setAttr ($item+".explicitTessellationAttributes") 1;
print ("Object: "+ $item +" has been done!n");
}
it's as simple as that (usually). the first line creates an array of items and the "for" command creates a loop taking each of those items in the array in turn (calling them "$item") and then doing whatever commands exist within the braces for each item. There is anouther way to approach for loops using a counter, but this way is easier to understand to begin with. have a look at your "using MEL" docs, they can be very informative...
on a side note, look at the flags you can use with the ls command becuase you may want to exclude certain types of object from your initial array (for example, if you select a mesh or light, the setAttr command will give you an error). also, when you want to combine $variables and text (strings) together you must surround the whole compound in parenthesis (...)
hope this is enough to set you off onto the merry road of MEL scripting.. 
:nathaN