in reply to I don't get map. How would I use map here?
Not sure if you're looking to replace both loops entirely or whether you need %byFile for other purposes ...
print map {join("\t=>", reverse split) . "\n"} <DATA>;
Update: replaced superflous foreach after print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: I don't get map. How would I use map here?
by Not_a_Number (Prior) on Jun 18, 2004 at 23:19 UTC | |
by Roy Johnson (Monsignor) on Jun 18, 2004 at 23:25 UTC |