All, I have a foreach statement that is going through a file and looking for all line w/out *Orig and what I want to do is if its return code was 0 then print out a short message, but I do not want to print out this short message more than n +1 times. Any ideas?
Here is my code: foreach (split /\n/, $lvimgDC_nonactive_tapelist ) { if ( /\((E\d+)/ ) { local $, = "\t"; print OUT "$1\n" unless substr($_, 0, 5) eq '*Orig'; if ( $? == 0 ) { print "There are no vault tapes today for lvimg DC drives \n"; } } } thanks, derek