in reply to Order by

Nice, but I had a problem. It worked with Perl 5.005 under SunOS and Redhat, but I got a compiler error with ActiveState 5.6 under Win32. It didn't like the postinc of $# on line 6: 'syntax error at - line 6, near "+)". I don't have 5.6 on any other platforms or earlier versions for win32, so I can't tell if this is a platform or version bug... anybody have some insight?

Replies are listed 'Best First'.
RE: RE: Order by
by takshaka (Friar) on Jun 04, 2000 at 06:10 UTC
    Yup. 5.6 on Linux complains as well. ++$# works fine though.
RE: RE: Order by
by KM (Priest) on Jun 05, 2000 at 04:53 UTC
    Interesting. I haven't tried it on 5.6, only 5.005 (FreeBSD, Linux, and *cough*NT*cough*). I am going to play with that, and maybe sent it to p5p. Or, has anyone seen this in the 5.6 docs? Maybe this is Yet Another Thing Not Working in 5.6

    Cheers,
    KM

      I sent in a bug report, but I haven't gotten a human reply yet. I'm not nearly familiar enough with the internals of Perl to look for the problem myself, unfortunately.
        I'm not sure if it is a bug or not, or if --$# is the problem. I had some folks try:

        perl -le 'print --$#';

        on 5.6, and they got -1, which is correct. I need a tuit to look into this.

        Those who seemed to have an error from this, please try that one line, and let me know if you had an error (with the error), or if you do not.

        Cheers,
        KM