in reply to Reference to a single array item in an array of hashes?
You can just use the built in aliasing of for loops, (I'm assuming this loop is initializing the array):
#!/usr/bin/perl use strict; use warnings; my $numTimes = 2; my $i = 0; my @jobTimes = ('') x $numTimes; # Make the array big enough foreach my $job (@jobTimes) { $job = { start => param("JobStart$i"), }; $i++; }
Update: made it compile and do what I mean.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Reference to a single array item in an array of hashes?
by ogxela (Novice) on Apr 05, 2004 at 22:55 UTC | |
by tedrek (Pilgrim) on Apr 05, 2004 at 23:10 UTC | |
by ogxela (Novice) on Apr 05, 2004 at 23:19 UTC | |
by tedrek (Pilgrim) on Apr 05, 2004 at 23:27 UTC | |
by ogxela (Novice) on Apr 06, 2004 at 00:08 UTC |