in reply to Re: Re: Re3: Code rot?
in thread Code rot?

Dragonchild: To your 2 points, I have now changed the script so that it passes use strict - still getting warnings. I have also ensured that the lines are coming back with data in it (105 lines in my test file, and I get 105 warnings).

Beechbone: Here are all the elsifs:

if (!$desc and /^(\w+):$/) { # ... } elsif (/^\{$/) { # ... } elsif (/^\}$/) { # ... } elsif (!$desc and /^"?$screen"?\.(.+):/) { # ... } elsif ($desc and /^\s*id:\s*(\d+)$/) { # ... } else { # ... }
As you can see, no concatenations in the elsifs, just a bunch of regexes. If you'd like, I can post the whole script, but I'll wait till someone says they want it. Thanks.

Replies are listed 'Best First'.
Re: Re: Code rot?
by Beechbone (Friar) on Sep 24, 2003 at 15:03 UTC
    Here is the concatenation:
    } elsif (!$desc and /^"?$screen"?\.(.+):/) {
    $screen is concatenated with the rest of the regex. I'd bet it was undef...
Re: Re: Code rot?
by aarestad (Sexton) on Sep 23, 2003 at 18:27 UTC
    Well well well. It seems running this script using the latest ActivePerl binary works just fine! There must be something broken with Cygwin's Perl... I'll take this up with the Cygwin people. Thanks anyway.

    EDIT: The problem was solved because Cygwin's perl was expecting Unix linefeeds, and my source file uses Windows CRLF. I was told that setting the environment variable

    export PERLIO=crlf
    solves this problem, and it did nicely. I'm also told, though, that it's a bit buggy, but in this case, it solves the mysterious difference between Cygwin Perl and ActivePerl. Cheers!