A pipe operator exists on perl v5.42?
You know how many languages have a "pipe" operator, either ready or in the making? Like PHP, here, for example: https://laravel-news.com/the-pipe-operator-is-coming-to-php-85
Well, Perl v5.42 (almost) has that too! Check these examples:
$ perl -E 'say "Alexander"->&CORE::substr(1, 3);'
lex
$ perl -E 'say ","->&CORE::join(qw/ 10 20 30 /);'
10,20,30
I believe this would work with any user defined or imported subroutine too, instead of the core functions (there you get to omit the "CORE::").
It is not a 5.42 thing:
$ perl -E 'print "lbarfThis is perl versionblarfAlexander"->CORE::substr(5, 20);print " ",$^V'
This is perl version v5.16.3
This is just normal Perl 5 behavior, although your need v5.16 or later for CORE.
Here's a demonstration that we build up in [Intermediate Perl](https://www.intermediateperl.com/) (and as a gist where I might expand this). The problem is that the arrow operator is under documented in perlop.
You can run this under v5.8.9 and it works fine (skipping the CORE bits). It probably runs fine on earlier Perls too but I don't have those lying around.
As for the pipe operator part of this post, the arrow is not going to do that. A proper pipe operator would feed all of the values from the left hand side to the right hand argument list. The arrow isn't going to do that.