search engines can follow static and dynamic urls. search engines can follow index.php?var=value, index.asp?var=value, index.cgi?var=value etc.
what about urls which are like www.domain.com/cgi-bin/xxxx.pl etc etc should i block these from being seen by the se's?
If the CGI script actually renders HTML there really is no need, it won't effect your SERPs. If you insist you can do it via your robots.txt file, but if the script doesn't render any HTML and just errors when you load it there really is no reason to block it.
check this article SEO Tips and Tricks according to 2nd point: The file extension doesn’t matter and never considered a factor while ranking- You can choose any extension like .. php, html, htm, asp .. You can even use ankit as your extension.. but don’t use something like .exe extension. So work on quality not on extension !