in reply to [untitled node, ID 260676]
This is a different approach which may or may not suit your needs:
Or, if you are going to use the categories only one time, you can code them as an on-the-fly anonymous hash...my %types = ( 0 => 'male', 1 => 'female', 2 => 'robot' ); $this_user = $types{$some_value};
HTH, David$this_user = { 0 => 'male', 1 => 'female', 2 => 'robot' }->{$some_value};
------------------------------------------------------------
"Perl is a mess
and that's good because the
problem space is also a mess." - Larry Wall
|
---|
In Section
Seekers of Perl Wisdom