in reply to I don't get map. How would I use map here?

Neither realy needs to be a map. However you could make the second one a map like the following:

map { print "$_\t=>$byFile{$_}\n"; } keys %byFile;

___________
Eric Hodges

Replies are listed 'Best First'.
Re^2: I don't get map. How would I use map here?
by duff (Parson) on Jun 18, 2004 at 20:15 UTC

    map in void context still rankles me for some reason (even though I understand that perl now has an optimization for it). So I'd write that as one of these:

    print map { "$_\t=>$byFile{$_}\n" } keys %byFile;
    or
    print "$_\t=>$byFile{$_}\n" for keys %byFile; # look Ma! no map! :-)