Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Router failing (operator error no doubt)

by toolic (Bishop)
on Feb 14, 2013 at 21:40 UTC ( #1018801=note: print w/replies, xml ) Need Help??

in reply to Router failing (operator error no doubt)

I think the syntax error may actually be on line 42:
chop ($status=\Q$snmpset $oid s $rtr.cfg\Q);

If I comment out that line, I no longer get the syntax error. Maybe the \Q should really be backticks (qx)?

chop ($status=`$snmpset $oid s $rtr.cfg`);

Replies are listed 'Best First'.
Re^2: Router failing (operator error no doubt)
by rmagin (Initiate) on Feb 15, 2013 at 14:04 UTC

    Thanks toolic, I thought it was a tick issue also. I tried the commenting out and saw that it ran clean on check but failed on execution

    I then tried placing the ticks so that the old progression should be calling the variable it still started spitting errors but this time from line 28. Too frustrating for what I don't actually want anyway.

    I have decided this is not what I want anyway. I used to have a super simple perl script that just called an EXPECT script and the router-file so that the EXPECT can telnet from a router-file into all the various equipment we have and send via tftp the configs down and then the perl moved it to its various sub directory dated and named so that if someone did an edit they could just run the expect script to their own router file to do repeated sequential downloads of one router if they are doing many edits...or they could run the script calling the entire router-file...

    I think I will just have to find my old harddrives and see if I can find it. It is not something I would expect someone to already have ready made, after all it took me a good bit to get the scripts right and sanity checked and I hate reinventing the wheel. Thank you again for taking a look, rmagin

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018801]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2018-01-20 01:58 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (226 votes). Check out past polls.