> Ok ... Thanks for helpin' out, HTH! I tried out your suggestions and > now the code looks like this:
You are welcome, but my name is Bee, HTH stands for 'Hope This Help' > > #!/usr/bin/perl > use warnings; > use strict; > > unless( @ARGV >= 2 ) { die "Usage: $0 file1 file2 [file3...]\n"; } > > my @results = (); > foreach my $file ( @ARGV ) { > open IN, $file or die "Couldn't open $file: $!\n"; > my @data = <IN>; > close IN; > s/\s+//g foreach( @data ); > @results = ( @results, @data ); Oops... sorry for I've confused for what you expected, so instead the above line with this : $results[$_] .= $data[$_] for (0..$#data) ; # would almostly do what you want now ! -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>