<?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/14215" />

	<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>2007-11-10T11:16:49-04:00</updated>

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

		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-11-10T11:16:49-04:00</updated>

		<published>2007-11-10T11:16:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77737#p77737</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77737#p77737"/>
		<title type="html"><![CDATA[Questions and more questions.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77737#p77737"><![CDATA[
It can indeed handle multiple replacements at once.<br>In order to achieve this, create a list with odd numbered elements being the key to look for, and even elements being what to replace it with. Order is of importance in some cases, as string map will scan the list and stop at the first match (ai needs to come before a, otherwize a will always make the match).<br>A simple example of a "map":<div class="codebox"><p>Code: </p><pre><code>set map [list "oldword1" "newword1" "oldword2" "oldword2" ...]set map [list "aibo" "cool dog" "ai" "artificial intelligence" "a" "the letter a"]</code></pre></div>You could also build this map using arrays and "array get", however, keep in mind that the order is not fixed when using "array get".<div class="codebox"><p>Code: </p><pre><code>set mymap(oldword1) "newword1"set mymap(oldword2) "newword2"set map [array get mymap]</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Sat Nov 10, 2007 11:16 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Lu5ck]]></name></author>
		<updated>2007-11-10T09:00:04-04:00</updated>

		<published>2007-11-10T09:00:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77674#p77674</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77674#p77674"/>
		<title type="html"><![CDATA[String map]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77674#p77674"><![CDATA[
Hi there,<br><br>I got question about "string map" command. I don't know how it work, the documentation is confusing for me. I assume that you can have many replacement in string map right? But I still kinda confused.<br><br>Regards,<br>Lu5ck<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8476">Lu5ck</a> — Sat Nov 10, 2007 9:00 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Lu5ck]]></name></author>
		<updated>2007-11-05T10:08:13-04:00</updated>

		<published>2007-11-05T10:08:13-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77467#p77467</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77467#p77467"/>
		<title type="html"><![CDATA[Questions and more questions.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77467#p77467"><![CDATA[
Hi there,<br><br>Thanks.<br><br>Regard,<br>Lu5ck<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8476">Lu5ck</a> — Mon Nov 05, 2007 10:08 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-11-05T10:04:35-04:00</updated>

		<published>2007-11-05T10:04:35-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77466#p77466</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77466#p77466"/>
		<title type="html"><![CDATA[Questions and more questions.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77466#p77466"><![CDATA[
Once every minute<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Mon Nov 05, 2007 10:04 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Lu5ck]]></name></author>
		<updated>2007-11-05T10:01:15-04:00</updated>

		<published>2007-11-05T10:01:15-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77464#p77464</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77464#p77464"/>
		<title type="html"><![CDATA[Questions and more questions.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77464#p77464"><![CDATA[
Hi there,<br><br>Thanks. I want to ask about "bind time * &lt;function&gt;" as well. If I indicate it as *, how often will the function be run?<br><br>Regards,<br>Lu5ck<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8476">Lu5ck</a> — Mon Nov 05, 2007 10:01 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[nml375]]></name></author>
		<updated>2007-11-01T10:07:46-04:00</updated>

		<published>2007-11-01T10:07:46-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77350#p77350</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77350#p77350"/>
		<title type="html"><![CDATA[Questions and more questions.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77350#p77350"><![CDATA[
It is case sensitive, and unfortunately, there is no documented option to make it non-case sensitive.<br><br>Make sure you open the file in append-mode, such that it is not truncated and the write pointer is at the end of the file. Ex:<div class="codebox"><p>Code: </p><pre><code>set fid [open "myfile" "WRONLY CREAT APPEND"]</code></pre></div>See the manual page for <a href="http://www.tcl.tk/man/tcl8.4/TclCmd/open.htm" class="postlink">open</a> other options.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8052">nml375</a> — Thu Nov 01, 2007 10:07 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[user]]></name></author>
		<updated>2007-11-01T10:05:03-04:00</updated>

		<published>2007-11-01T10:05:03-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77349#p77349</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77349#p77349"/>
		<title type="html"><![CDATA[Re: Questions and more questions.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77349#p77349"><![CDATA[
If you have questions about particular commands, check the <a href="http://tcl.tk/man/tcl8.4/TclCmd/contents.htm" class="postlink">manual</a>. There's no -nocase option in the latest stable release, so your best bet is to do a case insensitive regexp match <div class="codebox"><p>Code: </p><pre><code>lsearch -regexp $list {(?i)yourword}</code></pre></div> or convert everything to lower-/uppercase before doing the search.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2878">user</a> — Thu Nov 01, 2007 10:05 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Lu5ck]]></name></author>
		<updated>2007-11-01T09:45:44-04:00</updated>

		<published>2007-11-01T09:45:44-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=77348#p77348</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=77348#p77348"/>
		<title type="html"><![CDATA[Questions and more questions.]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=77348#p77348"><![CDATA[
Hi there,<br><br>I wanna ask is -exact of lsearch case sensitive? If it is, what option should I choose not to have the case sensitivity. Thank you.<br><br>I also got question regarding the file operation. If I wanted to update the file with the data from variable call "$data" which is a list. What should I do if I want to skip the first few line of the file from been overwrite. Thank you.<br><br>Regards,<br>Lu5ck<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8476">Lu5ck</a> — Thu Nov 01, 2007 9:45 am</p><hr />
]]></content>
	</entry>
	</feed>
