Generate zone files based off subnet

Hi, I'm attempting to generate zone files based off the subnet address of a reverse zone.

For example...
My text file contains the following..

5.4.7.0/24
5.4.7.0/24
68.74.23.0/24
68.74.24.0/24

I want to create a separate file for each of the listed blocks. Each file should contain placeholder reverse records as well as the zone configuration information at the top of the file. The file should also be named after the reverse block.

Example file should be the following... (putting {tab} to represent tabs.)

5.4.7.0\24 should become...

7.4.5.in-adddr.arpa (file name)
@{tab}{tab}NS{tab}ns1.servername.net.
@{tab}{tab}NS{tab}ns2.servername.net.
@{tab}{tab}NS{tab}ns3.servername.net.
@{tab}{tab}NS{tab}ns4.servername.net.
@{tab}{tab}NS{tab}ns5.servername.net.
1{tab}3600{tab}PTR{tab}5-4-7-1-reversezone.home.net
2{tab}3600{tab}PTR{tab}5-4-7-2-reversezone.home.net
3{tab}3600{tab}PTR{tab}5-4-7-3-reversezone.home.net
4{tab}3600{tab}PTR{tab}5-4-7-4-reversezone.home.net
5{tab}3600{tab}PTR{tab}5-4-7-5-reversezone.home.net
6{tab}3600{tab}PTR{tab}5-4-7-6-reversezone.home.net

I need to do this for about 2000 zones. Each zone file should go from 1 all the way down to 255. Any assistance would be greatly appreciated.

You say your input file contains:

5.4.7.0/24
5.4.7.0/24
68.74.23.0/24
68.74.24.0/24

Note that the first two lines are identical. Later you say:

Which shows a <backslash> character while your input file shows a <slash> character. Which is it? Or is everything starting with the third <period> on each input line supposed to be completely ignored?

In your example, you have a line:

Is this line without the " (file name)" supposed to appear in the file as well as be the name of the file containing the following data?

Are all 2000 zones to be changed in your input file, or will the input files be a lot shorter? (I.e., if I use awk for this will I need to consider file descriptor management?) Since the first two lines in your input are identical, should the second request to create that reverse zone file overwrite the first one, or append to it? Or does the script have to detect that the file already exists and give an error message instead of replacing or appending to the current file?

Other than creating the output files and writing the requested data into them, do you want the script to write anything to standard output when each input line is processed?