Ing. Branislav Gerzo wrote:
Hi pals,
Hello,
I have simple hash question, lets we have example code:
my %hash = ( 1 => 2, 2 => 3, 3 => 4, 4 => 5 );
while (my($key, $value) = each(%hash)) { print "$key => $value\n"; }
how I can print all values, if I want print that in th
Edward Wijaya [EW], on Tuesday, November 09, 2004 at 03:14 (+0800)
wrote:
EW> use Tie::IxHash module from CPAN, to preserve order in a Hash.
thanks for answer, indeed, I created small subroutine, to look...
sub hash_look {
while ( my ($key, $value) = each(%tab_def) ) {
print "$ke
use Tie::IxHash module from CPAN, to preserve order in a Hash.
Regards,
Edward WIJAYA
SINGAPORE
On Tue, 09 Nov 2004 03:06:03 +0800, Edward Wijaya <[EMAIL PROTECTED]>
wrote:
On Mon, 8 Nov 2004 11:59:13 +0100, Ing. Branislav Gerzo <[EMAIL PROTECTED]>
wrote:
Hi pals,
I have simple h
On Mon, 8 Nov 2004 11:59:13 +0100, Ing. Branislav Gerzo <[EMAIL PROTECTED]>
wrote:
Hi pals,
I have simple hash question, lets we have example code:
my %hash = ( 1 => 2, 2 => 3, 3 => 4, 4 => 5 );
while (my($key, $value) = each(%hash)) { print "$key => $value\n"; }
Hi pals,
I have simple hash question, lets we have example code:
my %hash = ( 1 => 2, 2 => 3, 3 => 4, 4 => 5 );
while (my($key, $value) = each(%hash)) { print "$key => $value\n"; }
how I can print all values, if I want print that in this order:
2 => 3
4 => 5
3 =&
DOH .
DOH .
NEVER MIND, user error ( <- gun to head)
DOH .
DOH .
DOH .
Hi
I have a hash defined as
my %flag3 = ( A => "DBSpace backup thread",
B => "Begin work",
C => "Commiting/committ
Hi
I have a hash defined as
my %flag3 = ( A => "DBSpace backup thread",
B => "Begin work",
C => "Commiting/committed",
H => "Heuristic aborting/aborted",
P => "Preparing/prepared",
R => "Aborting/aborted",
X
> Here's the setup:
> I have set up a hash %categories where the key is one number and the value
> is another
> i.e. $categories('1094') = 100049-0220-14
I assume you meant (note braces and quotes):
$categories{1094} = '100049-0220-14'
otherwise the value will be 100049-0220-14 = -
"Lara J. Fabans" wrote:
> Hi, perl-friends,...
Hi Lara,
You said:
> I had a while loop to search through each of the keys & values, but the problem is
> that it doesn't break out of the while loop, and the wrong value gets set as $myID;
Look at your words, thenlook at your code:
> #while(my (
> Morning, Dan
Morning!
>
> At 11:50 AM 1/23/2003 -0600, you wrote:
> > > i.e. $categories('1094') = 100049-0220-14
> >
> > do you mean $catagories{'1094'} ?
>
> Yup, I did. Never type anything in from memory :-)
I can't anyway because my memory doesn't work.
>
>
> > > value is ther
Lara J. Fabans wrote:
> Hi, perl-friends,
>
> Here's the setup:
> I have set up a hash %categories where the key is one number and the
> value is another
> i.e. $categories('1094') = 100049-0220-14
You need quotation marks here, like this:
$categories('1094') = '100049-0220-14';
othe
> Hi, perl-friends,
>
> Here's the setup:
> I have set up a hash %categories where the key is one number
> and the value
> is another
> i.e. $categories('1094') = 100049-0220-14
do you mean $catagories{'1094'} ?
>
> So, further on down, I'm trying to do a lookup in %categories
> to see i
Hi, perl-friends,
Here's the setup:
I have set up a hash %categories where the key is one number and the value
is another
i.e. $categories('1094') = 100049-0220-14
So, further on down, I'm trying to do a lookup in %categories to see if a
value is there. (I can
swap the key and the value in
13 matches
Mail list logo