I'm having trouble with this, and I'm sure someone out there has a really
clever solution--
I have a hash, %data, with, say, 32 elements.
From that, I need an array going from 01 to 32, i.e. 01, 02, 03, 04, etc.
But if my hash had 750 elements, I'd want it to go from 001 to 750.
I thought
Bryan R Harris wrote:
I'm having trouble with this, and I'm sure someone out there has a
really clever solution--
I have a hash, %data, with, say, 32 elements.
From that, I need an array going from 01 to 32, i.e. 01, 02, 03, 04,
etc.
The real question is what are you attempting
Bryan R Harris wrote:
I'm having trouble with this, and I'm sure someone out there has a
really clever solution--
I have a hash, %data, with, say, 32 elements.
From that, I need an array going from 01 to 32, i.e. 01, 02, 03, 04,
etc.
But if my hash had 750 elements, I'd want it to go
I'm having trouble with this, and I'm sure someone out there has a
really clever solution--
I have a hash, %data, with, say, 32 elements.
From that, I need an array going from 01 to 32, i.e. 01, 02, 03, 04,
etc.
The real question is what are you attempting to do? With the hash, you
Thanks to everyone who replied! Your suggestions cleaned out a block in my
mind, and I got it figured out. Here's what works, for those interested:
@allkeys = ('0' x (length(keys(%data)) - 1) . '1' .. (keys(%data)) . );
- B
ps. Is there an easy way to test this versus the solution below,
Bryan R Harris wrote:
I'm having trouble with this, and I'm sure someone out there has a
really clever solution--
I have a hash, %data, with, say, 32 elements.
From that, I need an array going from 01 to 32, i.e. 01, 02, 03,
04, etc.
The real question is what are you attempting to
Bryan R Harris wrote:
I'm having trouble with this, and I'm sure someone out there has a really
clever solution--
I have a hash, %data, with, say, 32 elements.
From that, I need an array going from 01 to 32, i.e. 01, 02, 03, 04, etc.
But if my hash had 750 elements, I'd want it to go from 001 to
Wagner, David --- Senior Programmer Analyst --- WGO wrote:
John W. Krahn wrote:
Bryan R Harris wrote:
I'm having trouble with this, and I'm sure someone out there has a
really clever solution--
I have a hash, %data, with, say, 32 elements.
From that, I need an array going from 01 to 32, i.e.