in reply to a rule of thumb for $_ in Perl

I wonder if you use map or write your own sub map_alike { my $f = shift; map { &$f($_) } @_; }.

Replies are listed 'Best First'.
Re^2: a rule of thumb for $_ in Perl
by apotheon (Deacon) on Oct 02, 2007 at 16:09 UTC

    Why the heck would I write that map_alike subroutine?

    print substr("Just another Perl hacker", 0, -2);
    - apotheon
    CopyWrite Chad Perrin