Without more specifics I can show you how to get the data. This is
assuming a lot because I am confused about what you want to do.
Here is what I gathered.
Read file if line is not all numeric, '-', and spaces then skip.

I am not sure what you want to do with columns that contain 999.999 so I
am going to leave them in the array. That way your subroutines can
account for the 999.999 and do what ever you need to the missing data.

open (IN, "<filename" ) or die ("Could not open file $!\n");
While (<IN>){
next unless /^\d+/; # if line does not start with numeric skip
my array = split /\s+/;
}

This is untested. But each column should now be in the array. Column 1
being $array[0].

Hope that helps.
Paul
-----Original Message-----
From: Antonio Jose [mailto:bastidasula.ve]
Sent: Thursday, August 21, 2003 9:51 AM
To: [email]pkrauspelsupply.com[/email]
Subject: Here you have a sample


Here you have a sample of my data:

Column 1 correspond a depth and the rest correspond to diferent
variables

1500.0000 12.6740 -999.2500 0.2204
-999.2500 -999.2500 1.4471
1500.5000 9.1897 -999.2500 0.2200
-999.2500 -999.2500 1.4526
1501.0000 6.5566 -999.2500 0.2161
0.9229 -999.2500 1.4835
1501.5000 4.7251 -999.2500 -999.2500 0.6541
-999.2500 1.7951
1502.0000 3.5049 -999.2500 -999.2500
0.7702 -999.2500 2.2192
1502.5000 3.0459 0.9990 0.0010 1.0000
0.0001 0.0309
1503.0000 2.9346 0.9990 0.0010
1.0000 0.0000 0.0118
1503.5000 2.9598 0.9990 0.0010 1.0000
0.0000 0.0056
1504.0000 3.0054 0.9990 0.0010
1.0000 0.0000 0.0057
1504.5000 3.0642 0.9990 0.0010
1.0000 0.0000 0.0090
1505.0000 3.3259 0.9990 0.0010
1.0000 0.0001 0.0236
1505.5000 4.2054 0.9766 0.0234
1.0000 0.0074 0.0719
1506.0000 5.4658 0.8294 0.1428
1.0000 0.2796 0.2179
1506.5000 6.4538 0.6971 0.1754
0.9981 1.9523 0.5869

We don't have the same lenght by variable, example: we can have 3456
values to variable 1 and 3460 to the second and so for.

Thanks

==============Original message text===============
On Thu, 21 Aug 2003 09:10:01 -0400 "Paul Kraus" wrote:

Can you send some sample data

-----Original Message-----
From: Antonio Jose [mailto:bastidasula.ve]
Sent: Thursday, August 21, 2003 8:58 AM
To: [email]beginnersperl.org[/email]
Subject: Reading columns, Missing data and more


Hello....

I am just learning a bit of Perl but I have some questions;

I have to read a file (numbers of rows variable), to obviate the first
lines until I find only columns with numbers, after, I have to create
vectors with each of this columns (indenpendent columns) but obviating
missing data (represented by the specific number -999.999). After I need
to process this vectors using iteractive method, subroutines, etc. I am
just working but after I define a new vector containing non missing
values I don't know how to read them, the languaje give an error like:
Use of uninitialized value in array element at columnas.pl line xx,
<filename> line YYY

The program is too long to send you but if you want I could

Thanks and excuse my english

Antonio




--
To unsubscribe, e-mail: [email]beginners-unsubscribeperl.org[/email]
For additional commands, e-mail: [email]beginners-helpperl.org[/email] ===========End
of original message text===========