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

	<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>2002-04-26T19:34:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-04-26T19:34:00-04:00</updated>

		<published>2002-04-26T19:34:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=6466#p6466</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=6466#p6466"/>
		<title type="html"><![CDATA[i need some help with database]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=6466#p6466"><![CDATA[
ok thanks i will think about it ...<p>Statistics: Posted by Guest — Fri Apr 26, 2002 7:34 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-04-25T03:24:00-04:00</updated>

		<published>2002-04-25T03:24:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=6431#p6431</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=6431#p6431"/>
		<title type="html"><![CDATA[i need some help with database]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=6431#p6431"><![CDATA[
Assuming the data is dynamic and needs to be written to the file on occasion, that way is a lot harder. You either have to dedicate a namespace to it, or have a list of all the variable names that you want to write out. Also, you have to be careful of the content. Instead of only being sensitive to newlines, now you have to watch for unbalanced quotes/braces and of course evaluation brackets.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Thu Apr 25, 2002 3:24 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Petersen]]></name></author>
		<updated>2002-04-24T17:05:00-04:00</updated>

		<published>2002-04-24T17:05:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=6421#p6421</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=6421#p6421"/>
		<title type="html"><![CDATA[i need some help with database]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=6421#p6421"><![CDATA[
actually the easier way would to be to make the file in direct tcl source.<br><br>ie<br><br>set var1 "blah"<br>set var2 "bleh"<br><br>then just read it in with source<br>you may wanna enclose the source command from inside a catch command though incase the datafile is corrupt.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=60">Petersen</a> — Wed Apr 24, 2002 5:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2002-04-24T16:38:00-04:00</updated>

		<published>2002-04-24T16:38:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=6415#p6415</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=6415#p6415"/>
		<title type="html"><![CDATA[i need some help with database]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=6415#p6415"><![CDATA[
Probably the easiest way is to make the file like this:<br><br>varname1<br>data1<br>varname2<br>data2<br>varname3<br>data3<br>...<br><br>To read it:<br>set fp [open data.txt r]<br>set pairs [split [read $fp] n]<br>close $fp<br>array set data $pairs<br><br>Now you can access the data by saying $data(varname)<br><br>To write the data to the file:<br>set pairs [array get data]<br>set fp [open data.txt w]<br>puts -nonewline $fp [join $pairs n]<br>close $fp<br><br>Just make sure your data doesn't have linebreaks in it.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8">stdragon</a> — Wed Apr 24, 2002 4:38 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2002-04-20T20:40:00-04:00</updated>

		<published>2002-04-20T20:40:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=6360#p6360</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=6360#p6360"/>
		<title type="html"><![CDATA[i need some help with database]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=6360#p6360"><![CDATA[
What's the best way i can make db's in files .... and how i can get vars from it very easy ?<br>I was thinking have file<br>var =&gt; 1<br>var2 =&gt; 2<br>in perl i could use split comand to get rid of =&gt; .... <br>can anyone help me?<p>Statistics: Posted by Guest — Sat Apr 20, 2002 8:40 pm</p><hr />
]]></content>
	</entry>
	</feed>
