in reply to Re: open a new xml file if line count exceeds 4000 lines
in thread open a new xml file if line count exceeds 4000 lines

:) For starters

You should replace all printf calls (each one of those is an error) with print

You should also replace each instance of print/reading from STDIN with a prompt function call, as in

my $value = prompt($message);

Whereas prompt resembles the prompt from here

Actually, you should switch from using STDIN to using @ARGV, its much more user friendly

Running the code through perltidy couldn't hurt either