in reply to Ignoring values in a hash slice assignment
my $i = -1; %record = map {defined($fields[++$i]) ? ($fields[$i] => $_) : ()} (spl +it /\t/, $_);
but I would not recommend using such an abomination in production code!
Now if only I could think of a good way to get rid of that temporary variable, which feels so profoundly un-Perlish...
|
|---|