programming-examples/perl/File/Output file.pl

4 lines
144 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
open(SORT, "| sort" ) or die; # Open pipe to write to
print SORT "dogs\ncats\nbirds\n" # Sorts birds, cats, dogs on separate lines.