Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re^3: Script stopped working...

by Marshall (Canon)
on Mar 18, 2018 at 19:38 UTC ( #1211208=note: print w/replies, xml ) Need Help??

in reply to Re^2: Script stopped working...
in thread Script stopped working...

As compared with the average complete amatuer question, you get an A+++.
Your question was clear and it was immediately obvious to me and others that you have some brain cells that are working hard. PerlMonks is a great place to learn, but this only works if you also work. You are working hard and I figure that the result will be great!

I think you are very close to "working code".
There are some fine points to be dealt with and some obvious things like "don't push when you can print!". The code creates an array of strings and then later the code loops over that array to print the strings. No need to do that.. just barf it out right away (e.g. print)

Replies are listed 'Best First'.
Re^4: Script stopped working...
by gentoobob (Novice) on Mar 18, 2018 at 20:31 UTC

    lol. Well thanks! I've taken programming classes in college (Java and VB), I've also read several Python books on my own and I do write small scripts for automation in Python since I'm a Network Engineer but nothing as complex as this Perl script you saw from an ex-coworker who no longer works there. My python scripts are pretty much "SSH into a switches or routers, get info or push commands". Maybe read from a file, etc. Anyways...diving into Perl was a little odd for me due to the ->, =>, @ symbols. Just trying to piece it together. I will definitely be back on this site to read the learning documents. I appreciate it.

      Senior Internet Network Engineer here who began programming Perl because of that job, so welcome! When I first came to Perlmonks, I stated vehemently "I'm not a programmer!". Heh. That didn't last a long time.

      I see you've got several responses, so come Monday when you're back at work, feel free to post back here on this thread or start another if necessary.

      Bit of a warm place in my heart for neteng's who get stuck in the throws of things ;)

        Right on! :-). Thanks man I appreciate it. Will do!

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2020-12-05 05:35 GMT
Find Nodes?
    Voting Booth?
    How often do you use taint mode?

    Results (63 votes). Check out past polls.