Re: Create array of references

2006-06-12 Thread beginner
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/

Re: Create array of references

2006-06-09 Thread John W. Krahn
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

Re: Create array of references

2006-06-09 Thread Peter Cornelius
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

Re: Create array of references

2006-06-09 Thread Muma W.
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-

Create array of references

2006-06-09 Thread beginner
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