in reply to Help with for loop

If the file is not too big, it will be more efficient to read the file just once, into an array:

open NB_FILE, '<', '/users/home/mkar/Perl_scripts/NB_JIL.txt' or die " +Couldn't open Netbackup file!: $!"; my @nb = <NB_FILE>; close NB_FILE or die "Couldn't close the file properly!: $!"

and then grep the array: grep /$backup_job/, @nb within the for loop.

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,