If $val doesn't match 'Cisco' then the expression won't be evaluated any
longer.  Now you could say:

$found = ($val =~ m/Cisco/) ? 1 : 0;



Serge Maandag wrote:

> Why not:
>
> My $val = `$prog $host public $oid`;
> $val =~ m/Cisco/ && $found = 1 || $found = 0;


--
Unsubscribe mailto:[EMAIL PROTECTED]
Help        mailto:[EMAIL PROTECTED]
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

Reply via email to