The "problem" is thus. I an reading in data and using split to get it to an array. Each element/column has a specific meaning, eg firstName, lastName etc Rather than using [0], [1] I figured I could set up an enum($firstName, $lastName, etc) I suppose the alternative is to define (constant or variable) each index name manually. Hm... Stupid me :)
($firstName, $lastName, etc) = (1 .. x); Close enough to the enum :D (unless I messed up the range notation). I guess that solves it. On 4/13/07, Rob Dixon <[EMAIL PROTECTED]> wrote:
yitzle wrote: > > Don't shoot me! > I can't find enum on the perldocs. Perl does have an enum, right? > How do I go about making an enum? I basically want a bunch of variables to > equal subsequent values, eg 0, 1, 2, ... Perl doesn't provide enum natively. But it's a solution to a problem, so perhaps you ought to tell us what the problem is instead of trying to implement a C solution? Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/