in reply to Enum

you could make a sub for each enum-type:
sub BLUE { 1 } sub RED { 2 } sub GREEN { 3 } ... print "Green" if $color == GREEN; print "Blue" if $color == BLUE;
it's not very practical if you have alot of types,
but just a few would work.

-- ar0n

Replies are listed 'Best First'.
RE: Re: Enum
by Fastolfe (Vicar) on Jun 20, 2000 at 22:00 UTC
    There is also a 'constant' module for defining constants in a similar (and perhaps more readable) fashion. Set them to powers of 2 and you can even use AND/OR operations on variables using them.