This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: [PATCH] honoring void context for map(), return from sub end test
authordavid nicol <whatever@davidnicol.com>
Mon, 8 Sep 2003 23:39:32 +0000 (18:39 -0500)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 9 Sep 2003 07:54:52 +0000 (07:54 +0000)
Message-Id: <1063082372.1375.126.camel@plaza.davidnicol.com>

(a testcase)

p4raw-id: //depot/perl@21131

t/op/grep.t

index 6e60813..5f4e7a6 100755 (executable)
@@ -135,3 +135,11 @@ sub ok {
     $test++;
 }
 
+{
+    sub add_an_x(@){
+        map {"${_}x"} @_;
+    };
+    ok join("-",add_an_x(1,2,3,4)), "1x-2x-3x-4x";
+}
+
+