<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1001168" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1001168</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/pls-hlp#comment-1005077</link>
    <description> &lt;p&gt;well, thank you robp.&lt;br /&gt;
orpheus: i know, i know, my problems are all soluble with reading books. and i do read books (programming perl, o&#039;reilly/perl cookbook, o&#039;reilly), but sometimes i&#039;m just too impatient to read me through the book to solve those little problem, when i know you outthere know the solution. ok, too impatient with myself too...  &lt;img src=&quot;http://www.webmaster-forums.com/ubb/wink.gif&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt;&lt;br /&gt;
so i ask you to be my teachers and help me. at this place, i&#039;d like to thank you all for helping me and my impatience...  &lt;img src=&quot;http://www.webmaster-forums.com/ubb/wink.gif&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Wed, 21 Jun 2000 07:22:00 +0000</pubDate>
 <dc:creator>merlin</dc:creator>
 <guid isPermaLink="false">comment 1005077 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/pls-hlp#comment-1005076</link>
    <description> &lt;p&gt;The problem is with&lt;br /&gt;
&lt;BLOCKQUOTE&gt;code:&lt;/blockquote&gt;&lt;/p&gt;
&lt;pre&gt;
if ($user eq @users) {
if ($pw eq @passwords) {
print &quot;login ok&quot;;
} else {
print &quot;login incorrect&quot;;
}
} else {
print &quot;no username&quot;;
}
[/code]
You are trying to compare the inputted variables to the @arrays containing the different usernames/passwords.  This cannot be done. You would need a foreach(@users) statement to do this.
&lt;BLOCKQUOTE&gt;code:&lt;pre&gt;
foreach(@users)
{
   if($user eq $_) {.....}
}
[/code]

But, after this, you are seeing if the inputted password is equal to any other passwords in the array.  This could create some problems, because it is not necesarily $user&#039;s password.

Here is what I would do.
&lt;BLOCKQUOTE&gt;code:&lt;pre&gt;
#The file has been opened, and @info contains:
@info=(&quot;rob,password&quot;,&quot;jon,password2&quot;); 

print &quot;Enter Username:&quot;;
chomp ($user = &amp;lt;STDIN&amp;gt; );
print &quot;Enter Password:&quot;;
chomp ($pw = &amp;lt;STDIN&amp;gt; );

if($user &amp;amp;&amp;amp; $pw)
{
	foreach(@info)
	{
		if(lc($_) eq lc($user).&quot;,&quot;.lc($pw))
		{
			print &quot;\nSuccess\n&quot;;
			exit;
		}
	}
}
else
{
	print &quot;\nYou did not enter all the information required\n&quot;;
}
[/code]

Hope that helps.


------------------
&lt;a href=&quot;http://www.thehungersite.com&quot; class=&quot;bb-url&quot;&gt;click here to help save lives&lt;/a&gt;
&lt;a href=&quot;http://www.wiredstart.com&quot; class=&quot;bb-url&quot;&gt;http://www.wiredstart.com&lt;/a&gt;  : The Technology Start Page &lt;/pre&gt;&lt;/blockquote&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;/pre&gt;</description>
     <pubDate>Fri, 16 Jun 2000 23:14:00 +0000</pubDate>
 <dc:creator>Rob Pengelly</dc:creator>
 <guid isPermaLink="false">comment 1005076 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/pls-hlp#comment-1005075</link>
    <description> &lt;p&gt;Complicated problems suck. Little problems are awesome.  &lt;img src=&quot;http://www.webmaster-forums.com/ubb/smile.gif&quot; alt=&quot;&quot; class=&quot;bb-image&quot; /&gt; I&#039;d just like to mention a book, Learning Perl volume 2. &lt;/p&gt;
&lt;p&gt;If you don&#039;t already have it I suggest you buy it. That will teach you everything there is to know about Perl.&lt;/p&gt;
 </description>
     <pubDate>Fri, 16 Jun 2000 17:04:00 +0000</pubDate>
 <dc:creator>Orpheus</dc:creator>
 <guid isPermaLink="false">comment 1005075 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
