ogxela has asked for the wisdom of the Perl Monks concerning the following question:
foreach my $job (@jobTimes) { $job{'startX'} = int(($job{'start'} - $dayStart) * $scaleConst); $job{'endX'} = int(($job{'end'} - $dayStart) * $scaleConst); $job{'start'} =~ s/^0+//; $job{'end'} =~ s/^0+//; }
Update: tedrek's suggestions worked when initializing the hash, but it's still erroring out when I try to work on it, as listed above. This is where I'd really like to avoid the $jobTimes$i{'foo'} construct.
Thanks,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reference to a single array item in an array of hashes?
by Ovid (Cardinal) on Apr 05, 2004 at 22:25 UTC | |
by ogxela (Novice) on Apr 05, 2004 at 22:49 UTC | |
|
Re: Reference to a single array item in an array of hashes?
by ccn (Vicar) on Apr 05, 2004 at 22:41 UTC | |
|
Re: Reference to a single array item in an array of hashes?
by tedrek (Pilgrim) on Apr 05, 2004 at 22:48 UTC | |
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 | |
|