Here's one way to use map for what you want:
#!/usr/bin/perl use strict; print map { "$_->[1]\t=>$_->[0]\n" } map { [ split ] } <DATA>; __DATA__ 0 5713813 276k CVS_RES 264k Desktop 17k Documes 33k SEARCH
But the magic really isn't so much in the map as it is in the use of an anonymous array.
In reply to Re: I don't get map. How would I use map here?
by duff
in thread I don't get map. How would I use map here?
by Plankton
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |