<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://community.activestate.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>ActiveState Community Site - Issue with brackets - Comments</title>
 <link>http://community.activestate.com/forum-topic/issue-brackets</link>
 <description>Comments for &quot;Issue with brackets&quot;</description>
 <language>en</language>
<item>
 <title>Always the simple typo&#039;s</title>
 <link>http://community.activestate.com/forum-topic/issue-brackets#comment-4482</link>
 <description>&lt;p&gt;On line 12 &lt;code class=&quot;geshifilter&quot;&gt;While (! good_word($name,$guess)){&lt;/code&gt; &lt;em&gt;While&lt;/em&gt; should be &lt;em&gt;while&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;On line 32 &lt;code class=&quot;geshifilter&quot;&gt;$someword =~ s/\W.*/&quot;&quot;/&lt;/code&gt; possible missing ;&lt;/p&gt;
&lt;p&gt;Other than that there are missing assignments... maybe just forum formatting?&lt;/p&gt;
</description>
 <pubDate>Sat, 08 Mar 2008 23:27:11 +0000</pubDate>
 <dc:creator>maldrac</dc:creator>
 <guid isPermaLink="false">comment 4482 at http://community.activestate.com</guid>
</item>
<item>
 <title>Issue with brackets</title>
 <link>http://community.activestate.com/forum-topic/issue-brackets</link>
 <description>&lt;pre class=&quot;geshifilter&quot;&gt;#! perl
init_words();
print &quot;What is your name? &quot;;
$name = ;
chomp ($name);
if ($name =~ /^randal\b/i) {
	print &quot;Hello, Randal, how nice of you to be here!&quot;;
} else {
	print &quot;Hello, $name\n What is the secret word? &quot;;
	$guess = ;
	chomp ($guess);
	While (! good_word($name,$guess)){
		print &quot;Wrong, Try again.  What is the secret word? &quot;;
		$guess = ;
		chomp ($guess);
	}
}
## Subs from here down.
sub init_words {
	open (WORDSLIST, &quot;wordslist&quot;) || die &quot;Can&#039;t open wordslist file: $1&quot;;     # syntax open( FILE HANDEL, file name)
	while ( defined ($name = )) {  # basically checks every line until it gets a undef string, which is returned as false.
		chomp ($name);
		$word = ;
		chomp ($word);
		$words{$name} = $word;
	}
	close (WORDSLIST) || die &quot;Couldn&#039;t close wordlist: $!&quot;; 
}
sub good_word {
	my($somename,$someguess) = @_;
	$somename =~ tr/A-Z/a-z/;
	$someword =~ s/\W.*/&quot;&quot;/
	if ($somename eq &quot;randal&quot;) {
		return 1;
	} elsif (($words{$somename} || &quot;groucho&quot;) eq $someguess) {
		return 1;
	} else {
	return 0;
	}
}&lt;/pre&gt;&lt;p&gt;I made this and it wont compile because of syntax errors at the curly brackets...I have no clue whats going on, could someone help me out?&lt;/p&gt;
</description>
 <comments>http://community.activestate.com/forum-topic/issue-brackets#comments</comments>
 <category domain="http://community.activestate.com/forums/perl-discussion-0">Perl discussion</category>
 <category domain="http://community.activestate.com/os/windows-xp-pro">Windows XP Pro</category>
 <pubDate>Sat, 08 Mar 2008 20:58:21 +0000</pubDate>
 <dc:creator>bryanhalf</dc:creator>
 <guid isPermaLink="false">2029 at http://community.activestate.com</guid>
</item>
</channel>
</rss>
