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
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
"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
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, $
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
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
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'
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
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".
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e
Begin forwarded message:
On Aug 23, 2007, at 4:25 PM, Mr. Shawn H. Corey wrote:
# How about?
my ( $year, $month, $doy, $tmax, $tmin, $par, $precip, $NH4, $NO3,
$O3, $CO2, $V1, $V2, $V3, $V4 ) = split;
# You can now store your totals by month as:
$totals{$year}{$month}{tmax} += $tmax;
.
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:
>
>
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
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 month doy tmax tmin par precip NH4
13 matches
Mail list logo