> "BRH" == Bryan R Harris writes:
BRH> Just as an academic exercise, I thought I should be able to do this:
BRH> **
BRH> @a=(l=>35,k=>31,r=>7,k=>6);
BRH> @r=qw/l r r k/;
try to use some white space in your code. even in short examples it
helps.
Just as an academic exercise, I thought I should be able to do this:
**
@a=(l=>35,k=>31,r=>7,k=>6);
@r=qw/l r r k/;
# make an anonymous hash using @a, then grab values from it using @r as keys
@a...@a}{@r};
print join(",",@a), "\n"'
***
ORDER BY is pointless with
selectall_hashref, as hashes are unordered.
> So I'm still confused about what I need to do. I want to:
>
> 1. display the rows with ifFollowedProtocol eq '' or 'yes' in order of
> medCategory
> 2. display the rows with ifFollowed
Gerald Host wrote:
> I'm using DBI's selectall_hashref with 5 key columns. I want to display
> each row where key col 1 is 'yes' or NULL (undef or '' ?)
>
>
> foreach my $medCategory (keys %{$href->{'yes'}->{qw('' 'yes')}->{qw(''
> 'yes')}}) {
> foreach my $med (keys %{$href->{qw('yes')}->{
));
So I'm still confused about what I need to do. I want to:
1. display the rows with ifFollowedProtocol eq '' or 'yes' in order of
medCategory
2. display the rows with ifFollowedProtocol eq '' or 'no' in order of
medCategory
I thought I could do
Gerald Host wrote:
>
> I'm using DBI's selectall_hashref with 5 key columns. I want to display
> each row where key col 1 is 'yes' or NULL (undef or '' ?)
>
>
> foreach my $medCategory (keys %{$href->{'yes'}->{qw('' 'yes')}->{qw(''
'yes')}}) {
> foreach my $med (keys %{$href->{qw('yes')}->{qw(
I'm using DBI's selectall_hashref with 5 key columns. I want to display
each row where key col 1 is 'yes' or NULL (undef or '' ?)
foreach my $medCategory (keys
%{$href->{'yes'}->{qw('' 'yes')}->{qw('' 'yes')}}) {
foreach my $med (keys
%{$href->{
On Tue, Sep 23, 2003 at 08:49:11PM +0530, Pandey Rajeev-A19514 wrote:
> Hi,
>
> I have a list like
>
> @list = ( "key1: Vlan1 :0989\n"
> "key2: Vlan2 :0989\n"
> "key3: Vlan3 :0989\n"
> "key4: Vlan4 :0989\n");
>
> I wanted to make a hash with keys as key1, key2 , key3, key4.
>
akes all the elements in the list as the key.
>
> Regards
> Rajeev
I'm sorry, I don't see what any of this has to do with what you originally
posted. Perhaps we need to start over.
>
> -Original Message-
> From: Bob Showalter [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, Sep
> Hi,
Howdy
>
> I have a list like
>
> @list = ( "key1: Vlan1 :0989\n"
> "key2: Vlan2 :0989\n"
> "key3: Vlan3 :0989\n"
> "key4: Vlan4 :0989\n");
>
> I wanted to make a hash with keys as key1, key2 , key3, key4.
>
Soemthing like this perhaps?
++UNTESTED++
my %hsh;
for(@lis
s/CAT/ =>
SERVER_NAME => sunomcr
sunomcr =>
TEST_CASE_OUTPUT_PATH => ../testlogs/
../testlogs/ =>
It seems it takes all the elements in the list as the key.
Regards
Rajeev
-Original Message-
From: Bob Showalter [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 23, 2003 8:56 PM
Pandey Rajeev-A19514 wrote:
> Hi,
>
> I have a list like
>
> @list = ( "key1: Vlan1 :0989\n"
> "key2: Vlan2 :0989\n"
> "key3: Vlan3 :0989\n"
> "key4: Vlan4 :0989\n");
>
> I wanted to make a hash with keys as key1, key2 , key3, key4.
>
> I want to write something like this :
>
Hi,
I have a list like
@list = ( "key1: Vlan1 :0989\n"
"key2: Vlan2 :0989\n"
"key3: Vlan3 :0989\n"
"key4: Vlan4 :0989\n");
I wanted to make a hash with keys as key1, key2 , key3, key4.
I want to write something like this :
**
13 matches
Mail list logo