Skip to content

@labels is nasty #5

@djzort

Description

@djzort

loading of @labels is nasty, no warnings and stuff... yuck. try something more like:

Extract labels into hash of index positions :)

my %labels = do {
my $idx = 0;
map { +($_ => $idx++) }
split /,/,
shift @lines;
};

which will look like...
%labels = ( field0 => 0, field1 => 1, field2 => 2);

then later use it like:
$data[$labels{'field'}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions