Dear Prasanth,

next time please reply to the list. I'm going to comment on your code after this
forwarded message arrives at the list.

Regards,

        Shlomi Fish

Begin forwarded message:

Date: Tue, 10 Feb 2015 11:01:56 +0530
From: prasanth <prasanthne...@gmail.com>
To: Shlomi Fish <shlo...@shlomifish.org>
Subject: Re: use perl format data


Hi,

Lets see if the  below code helps:

 sub read_array{
 my @file;
  ($filename) =@_;
open($fh,'<:encoding(UTF-8)', $filename)  or die "Could not open file
'$filename' $!";

 while (my $row = <$fh>) {
   chomp $row;
   push(@file,$row);
}
close($fh);


@file;
}

@fa= &read_array('fa.txt');

@fb= &read_array('fb.txt');

@fc= &read_array('fc.txt');

$i=0;

while($i<=3){
print "$fa[$i]\t$fb[$i]\t$fc[$i]\n";
$i++;
}

Thanks,
Prasanth.


On Sun, Feb 8, 2015 at 9:38 PM, Shlomi Fish <shlo...@shlomifish.org> wrote:

> On Sun, 8 Feb 2015 15:51:59 +0000
> "Wang, Zeng-Sheng (TS-GSD-China-ZZ)" <zengsheng.w...@hp.com> wrote:
>
> > Thanks for your kindly suggestion, you help me learn more of perl
> knowledge.
> >
>
> You're welcome! My pleasure.
>
> Regards,
>
>         Shlomi Fish
>
> --
> -----------------------------------------------------------------
> Shlomi Fish       http://www.shlomifish.org/
> http://www.shlomifish.org/humour/bits/facts/Emma-Watson/
>
> Chuck Norris once wrote a 10 million lines C++ program in Microsoft Notepad
> without having to use the backspace key. And it compiled without errors or
> warnings, and was 100% bug‐free.
>
> Please reply to list if it's a mailing list post - http://shlom.in/reply .
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>


-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Funny Anti-Terrorism Story - http://shlom.in/enemy

The conversation about how someone shouldn’t do something in an IRC channel is
always at least twice as long as the text the accused person created in the
first place — Chris62vw’s Rule

Please reply to list if it's a mailing list post - http://shlom.in/reply .
Hi,

Lets see if the  below code helps:

 sub read_array{
 my @file;
  ($filename) =@_;
open($fh,'<:encoding(UTF-8)', $filename)  or die "Could not open file '$filename' $!";
 
 while (my $row = <$fh>) {
   chomp $row;
   push(@file,$row);
}
close($fh);


@file;
}
 
@fa= &read_array('fa.txt');

@fb= &read_array('fb.txt'); 

@fc= &read_array('fc.txt');

$i=0;

while($i<=3){
print "$fa[$i]\t$fb[$i]\t$fc[$i]\n";
$i++;
}

Thanks,
Prasanth.


On Sun, Feb 8, 2015 at 9:38 PM, Shlomi Fish <shlo...@shlomifish.org> wrote:
On Sun, 8 Feb 2015 15:51:59 +0000
"Wang, Zeng-Sheng (TS-GSD-China-ZZ)" <zengsheng.w...@hp.com> wrote:

> Thanks for your kindly suggestion, you help me learn more of perl knowledge.
>

You're welcome! My pleasure.

Regards,

        Shlomi Fish

--
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
http://www.shlomifish.org/humour/bits/facts/Emma-Watson/

Chuck Norris once wrote a 10 million lines C++ program in Microsoft Notepad
without having to use the backspace key. And it compiled without errors or
warnings, and was 100% bug‐free.

Please reply to list if it's a mailing list post - http://shlom.in/reply .

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/



-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/

Reply via email to