#!/usr/bin/perl -w use strict; { my @lines = map { chomp; $_ } ; # magical input permits interactive, piped, or # batch operation. push @lines, map { chomp; $_ } <>; { local $, = $/; print @lines,'__DATA__', reverse @lines; } } __DATA__ #!/usr/bin/perl -w use strict; { # This block prints the source to this program on stderr. # It quines there so that scripts which write to stdout # can operate unimpeded. Generated by quinify. my @ary= map { chomp; $_ } ; { local $,=$/; print STDERR reverse( @ary ), '__DATA__', @ary; } }