For those still interested in Perl 5: I&#x27;ve added a translation of the functional example from this article to the functional-perl project(1) here:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;pflanze&#x2F;functional-perl&#x2F;blob&#x2F;master&#x2F;examples&#x2F;existing_files" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;pflanze&#x2F;functional-perl&#x2F;blob&#x2F;master&#x2F;examp...</a><p>(1) <a href="http:&#x2F;&#x2F;functional-perl.org" rel="nofollow">http:&#x2F;&#x2F;functional-perl.org</a><p>i.e.<p><pre><code>    my $paths    = stream(qw&lt; &#x2F;tmp &#x2F;var&#x2F;tmp &gt;);
    my $filename = &#x27;temp123&#x27;;
    my $ext      = list(qw&lt;pod pm pl&gt;);
    my $existing_files =
      $paths-&gt;cartesian_product(list(&quot;&#x2F;$filename.&quot;), $ext)
            -&gt;map(*list_to_string)
            -&gt;filter(unary_operator &quot;-e&quot;);</code></pre>