Are you sure it's not working as-written? That is, the line you're adding probably *is* being added to the end of that line - right after the carriage return. Which may be 10k characters later (the end of the file). While that "dos" error message may be related, it should be easy enough to ignore it.
I'd try this:
Well, I might find yet other ways to clean that up.for (@testarray) { if (s[(<tr><th>PC Number</th><th>Cores</th><th>Date</th><th>Customer +</th><th>Target</th><th>C/O Time</th><th>Update time</th><th>Build Ti +me</th><th>Status</th><th>Changes from Last Build</th></tr>)][$1$line +]) { last; # found it, done. } }
Actually, I'd probably use XML::Twig (if the HTML were actually well-formed XHTML) or some other HTML parser to find the location and then insert my extra text in that way.
In reply to Re: Tie::file and html vs dos
by Tanktalus
in thread Tie::file and html vs dos
by Flubb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |