in reply to Does perl offer an auto incremental assigning of constants, like Swift?

enum can do that any many more (e.g. bitmask constants).

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
  • Comment on Re: Does perl offer an auto incremental assigning of constants, like Swift?
  • Download Code

Replies are listed 'Best First'.
Re^2: Does perl offer an auto incremental assigning of constants, like Swift?
by bartender1382 (Beadle) on Apr 17, 2022 at 19:00 UTC
    Thanks, should have thought first to check for a module