in reply to Re: Named array indices
in thread Named array indices

AFAIK this is basically the same approach.

The constant pragma just produces the inlinedı subs I used.

IMHO the namespaces of constants and subs collide.

Cheers Rolf

1) like sub AAA(){1} , i.e. empty prototype and ending with value evaluable at compile-time.

Replies are listed 'Best First'.
Re^3: Named array indices
by ikegami (Patriarch) on Aug 05, 2010 at 20:30 UTC
    Constants are a bit more memory efficient and easier to read.
      I found another difference, it's possible to pass array-refs with use constants. :)

       sub AR () {[]} doesn't work!

      Cheers Rolf