http://qs321.pair.com?node_id=452635


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