Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Beginner project suggestions

by derby (Abbot)
on Apr 29, 2005 at 15:21 UTC ( #452635=note: print w/replies, xml ) Need Help??


in reply to Beginner project suggestions

All good suggestions above. My only addition would be to break your first project into more achievable chunks:
  1. create a script that reads commands from a local file and just echo'es them back to STDOUT
  2. create a script that connects via SSH to *one* remote host and does something simple (like ls the current directory). Take a look at Net::SSH.
  3. combine 1 and 2
  4. create a script based upon 3 that doesn't hard code a remote host but uses addresses read from a file.
-derby

Replies are listed 'Best First'.
Re^2: Beginner project suggestions
by jbush (Initiate) on Apr 29, 2005 at 15:40 UTC
    Thanks all for the replies. I do have some background in programming, so most of the basics seem to fit right in with perl very well. Since I last posted, I've had a little bit of time to sit down and write up some code... Below is what I have so far.. now to add the SSH code.
    open(FWS,"firewalls.txt") || die "Unable to load firewall list: $!"; while (<FWS>) { chomp; print $_; open(CMDS,"commands.txt") || die "Unable to load commands list: +$!"; while (<CMDS>) { chomp; print $_; } close CMDS; } close FWS;

      Just a FYI (not that it's better to do this). print defaults to $_ so sayin print $_ is the same as saying print

      It makes it more cryptic really, so it's not neccessarily better to do that.. just a FYI

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2023-03-23 04:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (60 votes). Check out past polls.

    Notices?