Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Does perl offer an auto incremental assigning of constants, like Swift?

by choroba (Cardinal)
on Apr 17, 2022 at 18:15 UTC ( [id://11143025]=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11143025]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-04-23 10:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found