print map ucfirst, "just another ", "perl hacker\n"; print map { ucfirst } "just another ", "perl hacker\n"; print map(ucfirst, "just another ", "perl hacker\n"); print map({ ucfirst } "just another ", "perl hacker\n"); #### print map(ucfirst, "just another ", "perl "), "hacker\n"; print map({ ucfirst } "just another ", "perl "), "hacker\n"; #### sub mymap (&@) { map { &{$_[0]}() } @_[1..@_-1]; } #### print mymap { ucfirst } "just another ", "perl hacker\n"; print mymap { ucfirst }, "just another ", "perl hacker\n"; #### print mymap sub { ucfirst }, "just another ", "perl hacker\n"; print mymap(sub { ucfirst }, "just another ", "perl hacker\n"); sub ucf { ucfirst }; print mymap \&ucf, "just another ", "perl hacker\n"; sub ucf { ucfirst }; print mymap(\&ucf, "just another ", "perl hacker\n"); $ucf = sub { ucfirst }; print mymap \&$ucf, "just another ", "perl hacker\n"; $ucf = sub { ucfirst }; print mymap(\&$ucf, "just another ", "perl hacker\n");