I have a subroutine that will receive parameters as follows:
key1, value1, key2, value2, key3, value3, ... keyN, valueN
I want to create a hash of key1 => value1, key2 => value2, ... , keyN =>
valueN in the subroutine. I'm curious if there's a Perl "trick" to
doing this beyond the obvious looping solution.
For example:
while ( some condition )
{
my $key = shift;
my $value = shift;
$myHash{$key} = $value;
}
What's my exit condition?
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
- Re: Question about creating a hash of key-value pairs based o... Ben Siders