Hi Isha,
   
   
  This may not help you. But some sort of debugging in your logic.
   
  for($j=0;$j<=13,$j++)
for($i=0;$i<3600;$i++)
   
  What is this 13 and 3600 ? is this the no of lines in the file ?.
   
  Print and see the $#inittime $#lgfdlr $#U10m2 $#V10m2. 
   
  So that they all have the same number of lines.
   
   
  Thanks,
  Prabu
  

Irenta <[EMAIL PROTECTED]> wrote:
  On Jul 29, 7:08 pm, [EMAIL PROTECTED] (Irenta) wrote:
> Hello all!
>
> I wrote a script that reads data from different files and put it all
> together in one new file in columns. Once I open the new file, I
> noticed that all data from all files is read, but it starts putting
> zeros in the last rows from the last two columns from the files it
> reads. (Example below). I checked the files and they both have the
> whole list of numbers. Somehow the script stops reading the data from
> the files. Has anyone experienced this? Is there a command that could
> help me? I would really appreciate any suggestions.
>
> 04 040913. 29.8 67.1 15.0 -25.9 2.6
> 04 040913. 29.8 67.9 19.0 -25.2 4.5
> 04 040913. 29.8 70.7 22.0 -23.0 3.2
> 04 040913. 29.8 72.7 23.0 -21.2 3.1
> 04 040913. 29.8 74.7 25.0 -18.9 2.3
> 04 040913 29.8 71.8 28.0 -20.8 4.1
> 04 040913. 29.8 66.7 30.0 -23.7 6.3
> 04 040913. 29.8 68.4 32.0 -2.0 7.3
> 04 040913. 29.8 69.8 34.0 0.0 7.6
> 04 040913. 29.8 72.6 35.0 0.0 6.2
> 04 040913. 29.8 73.9 36.0 0.0 5.2
> 04 040913. 29.8 74.4 38.0 0.0 5.0
> 04 040913. 29.8 70.1 40.0 0.0 7.2
> 04 040913. 29.8 67.0 41.0 0.0 8.7
> 04 040913. 29.8 70.9 44.0 0.0 8.7
> 04 040913. 25.3 90.1 45.0 0.0 0.2
> 04 040913. 24.4 77.9 45.0 0.0 5.4
> 04 040913. 25.2 83.2 47.0 0.0 1.9
> 04 040913. 24.7 78.9 50.0 0.0 4.0
> 04 040913. 25.1 84.1 54.0 0.0 2.4
> 04 040913. 24.7 80.8 56.0 0.0 4.1
> 04 040913. 24.7 82.1 58.0 0.0 4.5
> 04 040913. 24.6 79.8 60.0 0.0 4.5
> 04 040913. 29.4 74.2 45.0 0.0 0.0
> 04 040913. 29.4 75.4 44.0 0.0 0.0
> 04 040913. 29.5 76.3 42.0 0.0 0.0
> 04 040913. 29.5 75.6 40.0 0.0 0.0
> 04 040913. 29.5 77.1 38.0 0.0 0.0
> 04 040913. 29.5 76.7 36.0 0.0 0.0
> 04 040913. 29.5 76.7 34.0 0.0 0.0
> 04 040913 29.5 76.5 32.0 0.0 0.0
> 04 040913. 29.5 76.2 31.0 0.0 0.0
> 04 040913. 29.5 76.1 30.0 0.0 0.0
> 04 040913. 29.5 75.8 29.0 0.0 0.0
> 04 040913. 29.5 75.5 28.0 0.0 0.0
> 04 040913. 29.5 74.4 28.0 0.0 0.0
>
> Thanks,
> Isha

The part of the script that output to the file is the
following:

select(ALLF);

@inittime=(10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13,
13);

for($j=0;$j<=13,$j++)
{
for($i=0;$i<3600;$i++)
{
#100
printf "04 0409$inittime[$j].";
printf (" %6.1f",$fcontentt);
$fcontentr=$lgfdlr[$i];
printf (" %6.1f",$fcontentr);
$fcontenth=$lgfdlh[$i];
printf (" %6.1f",$fcontenth);
$U10m=$U10m2[$i];
printf ("%6.1f",$U10m);
$V10m=$V10m2[$i];
printf (" %6.1f",$V10m);
}

The original data looks like this for both columns (its not the same
as avobe, but it all looks alike):

-22.8751843486893
-22.531242615231
-22.1875255329602
-22.2744658806832
-22.6195836363245
-22.9655908311773
-23.3110765545002
-23.4838263614896
-24.858017538158
-24.514857460528
-22.7110916594702
-22.0232953789172
-22.0233266610968
-21.3351587053353
-20.9047771219217
-20.9905719397528
-20.8178432089233
-20.7301997181004
-20.7273862607902
-21.5824094727958
-20.9768502847344
-20.5461012947858
-20.715219488662
-20.5393661302302
-20.2780510559188
-19.0718863341354
-18.1242289849413
-18.5508189553684
-18.8900288435228
-18.6302041364828
-18.5424609104989
-18.1095881063968

Hope this help you help me :)

Isha


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/




       
---------------------------------
Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. 

Reply via email to