chiel wrote:
>
> I have a quick question. I use the following line, and this works ok:
>
> if ($$result_t{$operating_descr.".".$index} =~ /PCMCIA/ && $tmp_status == 3)
> {
>
>
>
> But if I change it to the following:
>
> if ($$result_t{$operating_descr.".".$index} =~ /PCMCIA/ || /USB/ &&
> $
chiel 写道:
>
> if ($$result_t{$operating_descr.".".$index} =~ /PCMCIA/ || /USB/ &&
> $tmp_status == 3) {
>
Hi,
=~ is going with higher PRI than ||.
$x =~ /Y/ || /Z/;
is the same as:
$x =~ /Y/ || $_ =~ /Z/;
so you should say:
$x =~ /Y|Z/;
or,
$x =~/Y/ || $x =~/Z/;
HTH.
--
To unsubscr
Hello,
I have a quick question. I use the following line, and this works ok:
if ($$result_t{$operating_descr.".".$index} =~ /PCMCIA/ && $tmp_status == 3)
{
But if I change it to the following:
if ($$result_t{$operating_descr.".".$index} =~ /PCMCIA/ || /USB/ &&
$tmp_status == 3) {
I ge