Hi All,
This is probably a very simple question, but what is the best way to search an array in perl, while ignoring CASE? I thought this:
[red]
#If oncallname is in the secondline array, put it in the hash table
foreach $x (@secondline){
if( ( (lc($oncallname)) eq (lc($x) ) ){
$oncall->{"SecondLine", $oncallName};
}
}
[/red]
The other thing I need to know is whether I can store more than one value under a hash key and how this would be recalled? My guess was:
[red]
print $q->Tr( $q->td($q->b($OnCallPeople->"Second Line"
),
$q->td( $oncallSumStyle, "Second Line: ", values(%oncall->{Second Line}))
);
[/red]
I know these must be very 'newbie' questions, but if someone could help, I'd very much appreciate it.
Thanks,
James.
This is probably a very simple question, but what is the best way to search an array in perl, while ignoring CASE? I thought this:
[red]
#If oncallname is in the secondline array, put it in the hash table
foreach $x (@secondline){
if( ( (lc($oncallname)) eq (lc($x) ) ){
$oncall->{"SecondLine", $oncallName};
}
}
[/red]
The other thing I need to know is whether I can store more than one value under a hash key and how this would be recalled? My guess was:
[red]
print $q->Tr( $q->td($q->b($OnCallPeople->"Second Line"
$q->td( $oncallSumStyle, "Second Line: ", values(%oncall->{Second Line}))
);
[/red]
I know these must be very 'newbie' questions, but if someone could help, I'd very much appreciate it.
Thanks,
James.