#!/usr/local/bin/perl -w use strict; my $config = $ARGV[0]; my $date = $ARGV[1]; my $program = "animals"; my $matrix = "netmatrix"; my $path = "path"; my %hash; my $host; my $key; die "Usage: $0 path-to-config-file yyyymmdd\n" unless @ARGV == 2; open (CONFIG, $config) || die "Cannot open $config_file:$!\n"; while (my $line = ) { chomp $line; next if ($line =~ /^\#/); my ($router, $cache, $nta, $as, $Sample) = split (' ', $line); $host = (split "-", $nta)[0]; $host =~ tr/0-9//d; $hash{$router}=$host; } foreach $key (keys %hash) { print "$program $hash{$key} $matrix $path/CISCO_$key.clean"; ####I'll execute the program here, once this is figured out }