[rrd-users] FW: More PERL Help Needed

Schroeder, Dennis Dennis.Schroeder at sanmina.com
Wed Sep 12 19:47:57 MEST 2001


Owen,

My bad there, I didn't type it into the message correctly.  The quotes are
in the correct locations.

-----------------------------------------------------------------
Dennis Schroeder                                ||        ||
Network Engineer                                ||        ||
SANMINA Global Network Services                ||||      ||||
Phone:  602-824-8431                       ..:||||||:..:||||||:..
Mobile: 602-432-3258                          Cisco  Certified
Email:  dennis.schroeder at sanmina.com         Network  Associate
-----------------------------------------------------------------
      You can tell whether a man is clever by his answers.
      You can tell whether a man is wise by his questions.
-----------------------------------------------------------------


-----Original Message-----
From: Owen DeLong [mailto:owen at delong.sj.ca.us]
Sent: Wednesday, September 12, 2001 10:45 AM
To: Schroeder, Dennis
Subject: Re: [rrd-users] More PERL Help Needed


If what you sent below is accurate depiction of your code, it means
you're missing an opening quote on the argument to open after
the FD, and that your closing quote is in the wrong place after
the ) (should be after the |, before the ) ). 

Owen


"Schroeder, Dennis" wrote:
> 
> Another problem...
> 
> [begin code sample]
>   open (FD, $prog $host public $oid |)" || die;
>  *my $val1 = <FD>;
>   close (FD);
> [end code sample]
> 
> I'm getting this error:
> 
>   Modification of a read-only value attempted at FILE.PL line 22.
> 
> Line 22 is the line with the (*) above.
> 
> I'm using this exact same code (I cut and pasted it) in another program
with
> no problems.  What does this mean?
> 
> -----------------------------------------------------------------
> Dennis Schroeder                                ||        ||
> Network Engineer                                ||        ||
> SANMINA Global Network Services                ||||      ||||
> Phone:  602-824-8431                       ..:||||||:..:||||||:..
> Mobile: 602-432-3258                          Cisco  Certified
> Email:  dennis.schroeder at sanmina.com         Network  Associate
> -----------------------------------------------------------------
>    Argue for your limitations and, sure enough, they're yours!
> -----------------------------------------------------------------
> 
> -----Original Message-----
> From: Schroeder, Dennis [mailto:Dennis.Schroeder at sanmina.com]
> Sent: Wednesday, September 12, 2001 9:49 AM
> To: rrd-users at list.ee.ethz.ch
> Subject: [rrd-users] PERL Help Needed
> 
> I am working on a program that will check for Cisco devices on our network
> (using SNMP).  I can poll a device and get a result like:
> 
>   Cisco Systems WS-C5505
>   Cisco Catalyst Operating System Software, Version 5.1(1)
>   Copyright (c) 1995-1999 by Cisco Systems
> 
> using this small command set:
> 
>   open (FD, "$prog $host public $oid1 |") || die;
>   my $val = <FD>;
>   close (FD);
> 
> How do I then check $val for the existance of "Cisco" anywhere in the
> output?
> 
> Thanks!
> 
> -----------------------------------------------------------------
> Dennis Schroeder                                ||        ||
> Network Engineer                                ||        ||
> SANMINA Global Network Services                ||||      ||||
> Phone:  602-824-8431                       ..:||||||:..:||||||:..
> Mobile: 602-432-3258                          Cisco  Certified
> Email:  dennis.schroeder at sanmina.com         Network  Associate
> -----------------------------------------------------------------
>             To lead a symphony, you must occasionally
>                    turn your back on the crowd.
> -----------------------------------------------------------------
> 
> --
> Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
> Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
> Archive     http://www.ee.ethz.ch/~slist/rrd-users
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi
> 
> --
> Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
> Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
> Archive     http://www.ee.ethz.ch/~slist/rrd-users
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi

-- 
***********************************************************************
"Every time you turn on your new car, you're turning on 20
 microprocessors.  Every time you use an ATM, you're using a computer.
 Every time I use a settop box or game machine, I'm using a computer.
 The only computer you don't know how to work is your Microsoft
 computer, right?"
        - Scott McNealy, CEO of Sun Microsystems, Inc.,
          from an April 1997 interview in Upside Magazine

***********************************************************************
"One World, One Web, One Program." - Microsoft Promotional Ad
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler


--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/rrd-users
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the rrd-users mailing list