Peng Yu said:
I don't quite understand how this works. Would you please write a
small perl program which can print the two streams (with the following
command) to help me understand it?
example.pl <(cat a.txt) <(cat b.txt)
makholm@makholm:/tmp$ perl ./example.pl <(cat example.pl) <(tr 'a-zA-Z' 'n-za-mN-ZA-M' < example.pl)
001: #!/usr/bin/perl
001:
001: use strict;
001: use warnings;
001:
001: my $fileno;
001: for my $file (@ARGV) {
001: $fileno++;
001: open my $fh, "<", $file
001: or next;
001:
001: printf "%03d: %s", $fileno, $_ while <$fh>;
001: }
001:
001: __END__
002: #!/hfe/ova/crey
002:
002: hfr fgevpg;
002: hfr jneavatf;
002:
002: zl $svyrab;
002: sbe zl $svyr (@NETI) {
002: $svyrab++;
002: bcra zl $su, "<", $svyr
002: be arkg;
002:
002: cevags "%03q: %f", $svyrab, $_ juvyr <$su>;
002: }
002:
002: __RAQ__
makholm@makholm:/tmp$
//Makholm