Thank you so much Jeff,
It works!
Best regards,
Onur
Jeff Pang wrote:
-----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/
--
Onur Sirin
IT Department, Systems Specialist
Sabanci University
Phone : +90.216.483 9202
Fax : +90.216.483 9186
e-mail: [EMAIL PROTECTED]