Here ya go ... this works for me. I tested it with up to 5 input files and it was still workin'. It does have a bug, though. It doesn't check whether all the input files are the same length. Nor did I test what happens when they AREN'T the same length. Let me know what ya think:
#!/usr/bin/perl use warnings; use strict; unless( @ARGV >= 2 ) { die "Usage: $0 file1 file2 [file3...]\n"; } my @results; foreach( @ARGV ) { open IN, $_ or die "Couldn't open $_: $!\n"; chomp( my @data = <IN> ); close IN; foreach( @data ) { s/\s+//g; } foreach( 0..$#data ) { $results[$_] .= $data[$_]; } } foreach( @results ) { print "$_\n"; } --Errin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>