in reply to I don't get map. How would I use map here?
with the proviso that it would remove anything already in %byFile. That is, it would take each element from DATA and translate it into two elements, creating a list of pairs to be treated as a hash. But I still don't think this is a great place for map, because it's not as easy to read (and quite a bit more confusing).%byFile = map {(split /\s+/)[1,0]} <DATA>;
|
|---|