#!/usr/bin/perl # print two files, side by side, author: Vlado Keselj, 2005 do { push @a, scalar(<>) } while (!eof); while (<>) { push @b, $_; } while (@a or @b) { my $x = shift @a; my $y = shift @b; chomp $x; chomp $y; print sprintf("%-50s | %-50s\n", $x, $y); }