Re: aggregating time steps

2007-08-24 Thread John W. Krahn
Kirk Wythers wrote: Sorry for the "not sure where to even begin" nature of this email, but I am stuck. I am trying to put together a aggregating script that takes daily climate data and produces monthly averages. For example, the input file has the form: year monthdoytmax tmin par

Re: aggregating time steps

2007-08-24 Thread Chas Owens
On 8/24/07, Kirk Wythers <[EMAIL PROTECTED]> wrote: snip > This is part of what was confusing me. I didn't see %totals declared > anywhere is the suggestion. snip Yeah, you can only tell it is a hash because of how it is used. I believe the person who posted the example expected you to know what

Re: aggregating time steps

2007-08-24 Thread Dr.Ruud
"Chas Owens" schreef: > Dr.Ruud: >> [my %totals;] >> Put >> print Dumper $totals; >> at the end of the code. > > Shouldn't that be >print Dumper \%totals; Yes, thanks for the correction. -- Affijn, Ruud "Gewoon is een tijger." -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addition

Re: aggregating time steps

2007-08-24 Thread Kirk Wythers
Thank you very much for the explanation Chas. It is starting to make more sense. The reason I was attracted to the solution #! /usr/bin/perl -w use strict; use warnings; $, = ' '; # set output field separator $\ = "\n"; # set output record separator my ( $year, $month, $doy, $tmax, $tmin, $

Re: aggregating time steps

2007-08-24 Thread Chas Owens
On 8/24/07, Dr.Ruud <[EMAIL PROTECTED]> wrote: > Kirk Wythers schreef: > > Gunnar Hjalmarsson: > >> Kirk Wythers: > > >>> I don't see how $totals{$year}{$month}{count} ++; is holding the > >>> count. > >> > >> Read about the auto-increment operator in "perldoc perlop". > > > > OK. I'll try and be

Re: aggregating time steps

2007-08-24 Thread Dr.Ruud
Kirk Wythers schreef: > Gunnar Hjalmarsson: >> Kirk Wythers: >>> I don't see how $totals{$year}{$month}{count} ++; is holding the >>> count. >> >> Read about the auto-increment operator in "perldoc perlop". > > OK. I'll try and be more clear to the degree of my ignorance. First, > I do not unde

Re: aggregating time steps

2007-08-24 Thread Chas Owens
On 8/24/07, Kirk Wythers <[EMAIL PROTECTED]> wrote: > > On Aug 23, 2007, at 11:17 PM, Gunnar Hjalmarsson wrote: > > > Kirk Wythers wrote: > >> I don't see how $totals{$year}{$month}{count} ++; is holding the > >> count. > > > > Read about the auto-increment operator in "perldoc perlop". > > OK. I'

Re: aggregating time steps

2007-08-24 Thread Kirk Wythers
On Aug 23, 2007, at 11:17 PM, Gunnar Hjalmarsson wrote: Kirk Wythers wrote: I don't see how $totals{$year}{$month}{count} ++; is holding the count. Read about the auto-increment operator in "perldoc perlop". OK. I'll try and be more clear to the degree of my ignorance. First, I do not

Re: aggregating time steps

2007-08-23 Thread Chas Owens
On 8/23/07, Kirk Wythers <[EMAIL PROTECTED]> wrote: > Sorry for the "not sure where to even begin" nature of this email, > but I am stuck. I am trying to put together a aggregating script that > takes daily climate data and produces monthly averages. For example, > the input file has the form: > >

Re: aggregating time steps

2007-08-23 Thread Mr. Shawn H. Corey
Kirk Wythers wrote: Sorry for the "not sure where to even begin" nature of this email, but I am stuck. I am trying to put together a aggregating script that takes daily climate data and produces monthly averages. For example, the input file has the form: ---8<--- snip I need to step through