You could use
join ',',@list, but that wouldn't get you the "and" at the end...
Untested code:
@thingsicouldknow = ('this','that','the other','the last thing');
@iknowthat = (0,1,3); #this, that, and last thing
# now print the things I know...
@thingsiknow = @thingsicouldknow[@iknowthat];
print "I know about "
print join(', ',@thingsiknow[0..@thingsiknow-2]);
print ", and", @thingsiknow[-1] if @thingsiknow > 1;
print ".\n".
It's probably not the best, but it might work.
Update:Fixed some off-by-one errors caused by using $#foo
This version should not print the "and" if you only know one thing.