Re: PARSING A COLUMN FILE

2001-07-02 Thread Casey West
On Mon, Jul 02, 2001 at 10:48:06AM -0400, Pedro A Reche Gallardo wrote: : Hi all, I have a file that it looks as it follows : : 1 0.057 M : 2 0.819 R : 3 0.731 V : 4 0.708 K : 5 0.070 G : 6 0.611 I : 7 0.055 + : 8 0.748 + : 9 0.864

RE: PARSING A COLUMN FILE

2001-07-02 Thread John Edwards
keys %data) { print "$key => $data{$key}\n"; } --- John -Original Message- From: Pedro A Reche Gallardo [mailto:[EMAIL PROTECTED]] Sent: 02 July 2001 15:48 To: [EMAIL PROTECTED] Subject: PARSING A COLUMN FILE Hi all, I have a file that it looks as it follows The

Re: PARSING A COLUMN FILE

2001-07-02 Thread Jeff 'japhy' Pinyan
On Jul 2, Pedro A Reche Gallardo said: >1 0.057 M >2 0.819 R >3 0.731 V >4 0.708 K >5 0.070 G >6 0.611 I >7 0.055 + >8 0.748 + >9 0.864 N >10 0.146a >11 1.782Q >12 2.707+ >13 0.893. >14 1.252

Re: PARSING A COLUMN FILE

2001-07-02 Thread Randal L. Schwartz
> "Randal" == Randal L Schwartz <[EMAIL PROTECTED]> writes: Randal> This is the simplest I could come up with in a few minutes. Hope it helps. Randal> my @stretch; Randal> while (<>) { Randal> my ($line, $val, $char) = split; Randal> if ($val < 1) { Randal> push

Re: PARSING A COLUMN FILE

2001-07-02 Thread Paul
--- "Randal L. Schwartz" <[EMAIL PROTECTED]> wrote:> use strict; > my @stretch; > while (<>) { > my ($line, $val, $char) = split; > if ($val < 1) { > push @stretch, $char; > } > if ($val >= 1 or eof()) { > if (@stretch >= 9) { > printf

Re: PARSING A COLUMN FILE

2001-07-02 Thread Randal L. Schwartz
> "Paul" == Paul <[EMAIL PROTECTED]> writes: Paul> Couldn't >> if ($val < 1) { >> push @stretch, $char; >> } >> if ($val >= 1 or eof()) { Paul> be done to the same result with just >> if ($val < 1) { >> push @stretch, $char; >> } elsif (eof()) { No, because I need to use the results of