Hello
Lets say I have a hashtable myhash{'valueA'}
If I have to controll if their is a value in myhash{'valueA'}
I thought I could do:
if(myhash{'valueA'} eq ""){
statement 1
}else{
statement 2
}
but when I do the control above it always goes to statement2 even if values doesnt exist in myhash{$valueA} (?)
Obviously this is wrong to do but how should I control if a value exist in an hashtable (it is a string).
What I want to do is to build up a string of format "234,234,456,"going through values in my hashtable so..
while (@row = $sth2->fetchrow_array ()) {
if($agentsinqueue{$que} eq ""){
$agentsinqueue{$que}=$row[0];
}else{
$agentsinqueue{$que}=$agentsinqueue{$que}.",".$row[0];
}
Regards/D_S
Lets say I have a hashtable myhash{'valueA'}
If I have to controll if their is a value in myhash{'valueA'}
I thought I could do:
if(myhash{'valueA'} eq ""){
statement 1
}else{
statement 2
}
but when I do the control above it always goes to statement2 even if values doesnt exist in myhash{$valueA} (?)
Obviously this is wrong to do but how should I control if a value exist in an hashtable (it is a string).
What I want to do is to build up a string of format "234,234,456,"going through values in my hashtable so..
while (@row = $sth2->fetchrow_array ()) {
if($agentsinqueue{$que} eq ""){
$agentsinqueue{$que}=$row[0];
}else{
$agentsinqueue{$que}=$agentsinqueue{$que}.",".$row[0];
}
Regards/D_S