Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Router Backup.pl failing (operator error no doubt)

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


in reply to Router Backup.pl 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`);


Comment on Re: Router Backup.pl failing (operator error no doubt)
Select or Download Code
Re^2: Router Backup.pl 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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018801]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2014-10-01 18:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (32 votes), past polls