in reply to Sub only grabbing first line from STDIN

You are reading in the entire file, but are accessing it wrong. As others have pointed out, your program is a little mangled, but despite this, it is surprisingly close to working.

It may not have been explained why you were getting the first line of the file, but not the others. Here's the reason:
my $text = $text[$line];
Here, because of the way you have structured your loop, $line contains a line from your file. This is then used to look up an entry in the @text array, so it has to be converted to a number. Since your text file probably doesn't have any numbers, this is always 0, which is the "first" line of your file. If your file had numbers in it, you would get quite a different result. Also note that even though you delete the control characters, you just print the same old line unmodified, instead of your fixed variable.

Your whole program could probably be replaced with:
% perl -pi -e 'tr/\x0c-\x0d//d' /usr/spool/lpd/dom/dom.work
If you want to use it as a script, it has to be re-worked.

A few notes: