in reply to Need help assembling a list
Unless the list of CVE's is so large you cannot slurp them into memory, this should work reasonably fast.
Quick, dirty and untested code:
use 5.010; use strict; use warnings; use Scalar::Util qw [shuffle]; my @ips = `cat ip_addresses`; my @cves = shuffle `cat cves`; chomp @ips; chomp @cves; while (@ips) { say "IP address $_ gets CVE ", shift @cves; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Need help assembling a list
by hbm (Hermit) on Jan 27, 2009 at 15:59 UTC | |
by JavaFan (Canon) on Jan 27, 2009 at 16:35 UTC | |
by hbm (Hermit) on Jan 27, 2009 at 18:13 UTC | |
by ikegami (Patriarch) on Jan 27, 2009 at 21:41 UTC | |
|
Re^2: Need help assembling a list
by spstansbury (Monk) on Jan 30, 2009 at 13:53 UTC |