in reply to Re: Re: Re: Yet Another Perl Aptitude Test (yapat)
in thread Yet Another Perl Aptitude Test (yapat)

Hi tame1! I'm sorry this is happening. It is possible that you are having a problem because my Windoze machine has put different line feed characters in the program than your machine wants to use. I found that when I carried this over to my linux box, I had to run this one-liner to get it to work:

perl -p -ibak -e 's/\015//g'

This removed any funky characters which made the regex fail. Again, I'm really sorry that happened-- tell me if this fixes the problem (and if it doesn't, please tell me too!) Thanks. -zeno

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Yet Another Perl Aptitude Test (yapat)
by premchai21 (Curate) on Mar 02, 2001 at 06:29 UTC
    I am having the same problem, and the one-liner didn't fix it. Suggestions?

      Another common problem is if you just used "cut'n'paste" to grab the script, then you probably introduced leading spaces on the lines. You should probably use the "d/l code" link at the bottom of the node instead (though browsers can be a bit silly about this and it can introduce other problems that way).

      It would probably good to update the script so that it ignores whitespace completely.

              - tye (but my friends call me "Tye")
        You're right tye, I just fixed the code not to use newlines in the regex. I should have done it that way from the beginning, because windoze and linux do different things with newlines (it seems windows stores \r\n at the end of each newline). It should work now.