Hi Jeff,

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.
my @out = map { chomp; my $f2 = <fh2>; chomp $f2; $_ . ' ' . $f2 . ' ' . <$fh3> } <$fh1>;

Jeff Pang wrote:
-----Original Message-----
From: Onur Sirin <[EMAIL PROTECTED]>
Sent: Jan 24, 2008 10:50 PM
To: Jeff Pang <[EMAIL PROTECTED]>
Cc: beginners@perl.org
Subject: Re: merging the columns

What if is there another file (fh3) to merge with fh1 and fh2?
How should i fix that line: my @out = map { chomp; $_ . ' ' . <$fh2> } <$fh1>;

Hi,

Just add another filehandle in the map:

open my $fh3,'3.txt' or die $!;
my @out = map { chomp; my $f2 = <fh2>; chomp $f2; $_ . ' ' . $f2 . ' ' . <$fh3> } 
<$fh1>;

didn't test it.good luck.

--
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]

Reply via email to