On 9 Jun 2006 at 11:55, Peter Cornelius wrote:
> The problem you're having is that you're creating a new hash
> reference in each of your if/elsif statements. I'm going to make
> some assumptions about your data since I don't know anything about
> it, but it looks like you want to group back/
beginner wrote:
> Hi,
Hello,
> I am trying to create an array of references but am getting stuck at
> how/when to push the reference into the array
>
> Below is some sample data and a snip of what I have been trying. What
> is happening is that the reference $times is getting pushed into the
The problem you're having is that you're creating a new hash
reference in each of your if/elsif statements. I'm going to make
some assumptions about your data since I don't know anything about
it, but it looks like you want to group back/home/out times by day.
If that's what you want then
beginner wrote:
Hi,
I am trying to create an array of references but am getting stuck at
how/when to push the reference into the array
[...]
}
elsif ($key =~ /j/ ) {
$times = { out => $time};
Try this:
$times->{out} = $time;
[...]
--
To unsubscribe, e-
Hi,
I am trying to create an array of references but am getting stuck at
how/when to push the reference into the array
Below is some sample data and a snip of what I have been trying. What
is happening is that the reference $times is getting pushed into the
array before all the keys are define