in reply to Ignoring values in a hash slice assignment
my @desired_fields = (1, 3, 5 .. 7, 9); my @field_names = qw(A B C D E F); my %stuff; while (<DATA>) { chomp; @stuff(@field_names} = (split /\t/, $_)[@desired_fields]; }
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
|---|