It seems that the code is also incomplete, so we cannot try to reproduce your error. Could you please update your question with the full ./file_delimiter.pl script? If it's too large, at least the missing part that calls to delimit(...) would be fine.
BTW, don't forget to enclose the code with <code> ... </code> tags.
the file is very large and it exists on a private network (w/o internet access). However, here are the lines from the other scipt that call it.
require "./file_delimiter.pl";
&delimit($T, $C, $R, $S, $B, $filename);