in reply to REALLY PERL ??

Perl STILL ain't ready for primetime

That's a bit offputting and plain FUD. Perl has the lowest defect density of any high level language and the best support for many things other languages are generally poor with like Unicode and regex. Perl was "ready for primetime" in 1990 or even earlier and it's only improved since.

When an error seems inscrutable it's usually operator error. I've done it before, spent hours chasing a bad brace once, just as you did here so I'm not harshing on you. It happens. Good practices can keep it a rarity. If the error was obviously not in the indicated line, the first thing to do is start looking backwards or commenting out lines until you get back to the real problem. That would have taken all of 3 minutes. As hippo said, better variable/sub names are a help, single letter names are code smell. Twenty+ lines of bare code is fine; keeping things in tight blocks and subs makes problems harder to introduce and easier to find.

Replies are listed 'Best First'.
Re^2: REALLY PERL ??
by stevieb (Canon) on Aug 15, 2017 at 19:12 UTC
    keeping things in tight blocks and subs makes problems harder to introduce and easier to find.

    That, right there.

    Sometimes, depending on the issue, Perl will inform you of a problem on a line that doesn't seem correct, because it can't accurately figure out exactly what line it really happened on. Parsing Perl is most definitely not a trivial task, and sometimes even the interpreter can't quite figure it out when dealing with syntax issues. Keeping your blocks/subs etc so they fit within a single screen (where feasible/possible) significantly aids in finding these issues.

    Throw in a decent IDE or even editor (vi/vim was thrown around) can help with this process as they can highlight the specific issue.

    As far as the OP's comment about "prime-time", that's asinine. Other programming languages throw the same way Perl does in this regard in certain situations, unable to identify the exact line number. Heck, I can even get C to do this, so I won't go any further into that FUD, as Your Mother aptly put it. I'll just chalk that up as being claimed out of pure frustration by OP.

Re^2: REALLY PERL ??
by LanX (Saint) on Aug 15, 2017 at 16:42 UTC
    > ...commenting out lines until you get back to the real problem. That would have taken all of 3 minutes.

    Agreed ...and at most 3 minutes.

    These are 4-5 steps with an binary search pattern.

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

      Binary search blew my mind when my CS teacher introduced it to us in high school. Before then it had never clicked that information and numbers had properties that were practically magic if you just thought about them in the right way.

        yes, even easier if one uses an editor which can easily out-comment selections aka regions and comes with undo trees and regional undo. ;-)

        Cheers Rolf
        (addicted to the Perl Programming Language and ☆☆☆☆ :)
        Je suis Charlie!