How to modify the query to exclude posts by slug?

You can get the post ID from the slug with the url_to_postid() function:

$ID = url_to_postid(slug);

then just exclude the ID from your query:

query_posts(array('category_name' => 'Mycat', 'posts_per_page' => -1, 'post__not_in' => $ID ));

You can create an array of post IDs if you need to exclude multiple pages.

tech