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; }