Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
Perl: the Markov chain saw
 
PerlMonks  

Re: What is the error in my script or file setup?

by Anonymous Monk
on Sep 01, 2001 at 19:08 UTC ( [id://109670]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to What is the error in my script or file setup?
in thread File Input and Output

I recently had a similar problem. The error is in your comparison ($i eq $list). Then the loop gets to the point that you are expecting a "Yes", the values of your variables are $i="harv" $list="harv\n" I solved my problem by changing $i to include the carriage return. You could also solve this problem by using pattern matching rather than a straight comparison, or by chopping off the last character of the input lines.
  • Comment on Re: What is the error in my script or file setup?

Replies are listed 'Best First'.
Re: Re: What is the error in my script or file setup?
by Anonymous Monk on Jun 06, 2002 at 14:57 UTC
    It looked like he was chomping in his code. He was chomping the list as he added each element to the array. That should take care of the carriage return that you are referring to.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://109670]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.