Or, to make it a one-liner: $found = map /cisco/i,`$prog $host public $oid`;
:) The guy is even less of a Perl guru than I am, so I was keeping it simple. Serge. -----Original Message----- From: Todd Caine [mailto:[EMAIL PROTECTED] Sent: donderdag 13 september 2001 17:28 To: Serge Maandag Cc: Schroeder, Dennis; [email protected] Subject: Re: [rrd-users] Re: FW: More PERL Help Needed 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
