User defined pipe and redirection operators: Difference between revisions

m
→‎{{header|Perl 6}}: Incoherent I am
(→‎{{header|ALGOL 68}}: Re-run with corrected UD pipe operators - pioneer and scientist counts now agree with the Go example. Replaced formatted transput with unformatted as the latest (Windows) Algol 68G didn't like it.)
m (→‎{{header|Perl 6}}: Incoherent I am)
Line 620:
 
=={{header|Perl 6}}==
Implementing cat, redirect(<), head, tail and tee. I share the same general lack of enthusiasm as the Perl example author to implement other the other shell ops. Many of the ops already exist in some form in Perl 6, though they may have slightly different syntax and precedence as the shell ops. I didn't bother implementing pipe (|) as Perl 6 pretty much has chaining semantics built in.
 
The less than '<' operator is prettyvery low level in Perl 6 and would be troublesome to override, so is implemented as 'redirect'. The sort and unique directives don't really have any effect on the final result string, it would be the same without them, but it is following the task example.
 
This assumes that the data is in a tab separated file "List_of_computer_scientists.lst" in the current directory.
10,333

edits