-----Original Message-----
>From: Onur Sirin <[EMAIL PROTECTED]>
>i get the following error:
>Use of uninitialized value in scalar chomp at xxx.pl line 12.
>Use of uninitialized value in concatenation (.) or string at xxx.pl line 12.

Please try this:

$ cat 1.txt 
aaa
bbb
xxx

$ cat 2.txt 
ccc
ddd
yyy

$ cat 3.txt 
111
222
333

$ cat t1.pl 
use strict;
use warnings;

open my $fh1,'1.txt' or die $!;
open my $fh2,'2.txt' or die $!;
open my $fh3,'3.txt' or die $!;

my @out = map { chomp; chomp(my $tmp=<$fh2>); $_ .' '. $tmp .' '. <$fh3> } 
<$fh1>;

close $fh1;
close $fh2;
close $fh3;

print @out;

$ perl t1.pl 
aaa ccc 111
bbb ddd 222
xxx yyy 333

--
Jeff Pang - [EMAIL PROTECTED]
http://home.arcor.de/jeffpang/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to