On 5 August 2010 03:39, John W. Krahn wrote:
> Mike Martin wrote:
>>
>> Hi
>
> Hello,
>
>> I have the following code
>> my $type='val';
>> my $type_g;
>> foreach my $key (keys %options){
>> my $chk=$options{$key}->[3];
>> $type_g=$options{$key}->[4] if $chk=~/$type/;
>> #$type_g=$options{$key}->[4
- Show quoted text -
On 5 August 2010 04:58, Chas. Owens wrote:
> On Wed, Aug 4, 2010 at 11:36, Mike Martin wrote:
> snip
>> This fails but if I replace
>> $type_g=$options{$key}->[4] if $chk=~/$type/
>>
>> with either
>> $type_g=$options{$key}->[4] if $type=~/$chk/; (ie:reversing the match)
>>
>
On Wed, Aug 4, 2010 at 11:36, Mike Martin wrote:
snip
> This fails but if I replace
> $type_g=$options{$key}->[4] if $chk=~/$type/
>
> with either
> $type_g=$options{$key}->[4] if $type=~/$chk/; (ie:reversing the match)
>
> or
>
> $type_g=$options{$key}->[4] if $type eq $chk;
>
> any idea on the r
Mike Martin wrote:
Hi
Hello,
I have the following code
my $type='val';
my $type_g;
foreach my $key (keys %options){
my $chk=$options{$key}->[3];
$type_g=$options{$key}->[4] if $chk=~/$type/;
#$type_g=$options{$key}->[4] if $type=~/$chk/;
}
print "\n",$type,"\t",$type_g,"\n";
This fails but i
Hi
I have the following code
my $type='val';
my $type_g;
foreach my $key (keys %options){
my $chk=$options{$key}->[3];
$type_g=$options{$key}->[4] if $chk=~/$type/;
#$type_g=$options{$key}->[4] if $type=~/$chk/;
}
print "\n",$type,"\t",$type_g,"\n";
This fails but if I replace
$type_g=$options{$ke