in reply to Using multliple formats when writing to a file

open (REPORT,">$filename") || die "error"; select(REPORT); ... $^ = "NEWPAGE"; ... foreach [outer loop] $~ = "FIRST_FORMAT"; write; foreach [inner loop] $~ = "SECOND_FORMAT"; write; [end inner loop] [end outer loop] close (REPORT) || die ...
1 Peter 4:10