in reply to Help with for loop

Suggestions:

1. To avoid the IO overhead of creating, then reading the file (which, presumably you do not need for other purposes),
you can pipe the command output directly into a perl filehandle using a construct like:

open(my $netbackup, "-|", "autorep -J NB\%") or die could not open net +backup:$!"; while (<$netbackup>){ next if m/Job Name|____/; # do the equivalent of sed #Presumably, you don't need sort # If you do, you can apply filters, accumulate, THEN sort in perl. } close $netbackup;
2. Since you have already read in @server_names, you can grep each of those to find if any are in the line read from $netbackup, and process it.

             My goal ... to kill off the slow brain cells that are holding me back from synergizing my knowledge of vertically integrated mobile platforms in local cloud-based content management system datafication.