<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/15457" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2008-02-29T20:52:14-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/15457</id>

		<entry>
		<author><name><![CDATA[honeybee]]></name></author>
		<updated>2008-02-29T20:52:14-04:00</updated>

		<published>2008-02-29T20:52:14-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81294#p81294</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81294#p81294"/>
		<title type="html"><![CDATA[removing string from a list.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81294#p81294"><![CDATA[
Thanks Sir_Fz; help from you are always handy and appreciated <br>i resolved that issue but this is much simpler than I could think of.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7174">honeybee</a> — Fri Feb 29, 2008 8:52 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Sir_Fz]]></name></author>
		<updated>2008-02-29T12:38:35-04:00</updated>

		<published>2008-02-29T12:38:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81280#p81280</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81280#p81280"/>
		<title type="html"><![CDATA[removing string from a list.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81280#p81280"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>if {[lsearch -exact $dynamicList "aa"] == -1} { lremove $staticList "aa"}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=3085">Sir_Fz</a> — Fri Feb 29, 2008 12:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[honeybee]]></name></author>
		<updated>2008-02-28T22:04:51-04:00</updated>

		<published>2008-02-28T22:04:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=81262#p81262</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=81262#p81262"/>
		<title type="html"><![CDATA[removing string from a list.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=81262#p81262"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>proc lremove { list what } {while { [set pos [lsearch -exact $list $what]] != -1 } {set list [lreplace $list $pos $pos]}return $list}# example:# set list "aa bb cc"# set list [lremove $list "bb"] will set list to "aa cc"</code></pre></div>its useful when we need to remove a string from a list but sometimes we need to compare two lists and remove items from one list from other if not found.<br><br># example: <br># set staticList {aa bb cc dd ee}<br># set dynamicList {bb cc dd ee}<br><br>Now we need to remove aa from staticList as its not present in dynamicList what are the possibilities.<br><br>Sorry for my previous post I didn't make much sense and moved my post from Tcl Faq where proc lremove was posted by Sky to Tcl Help I think it best fits here.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=7174">honeybee</a> — Thu Feb 28, 2008 10:04 pm</p><hr />
]]></content>
	</entry>
	</feed>
