Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Tie::file and html vs dosby Flubb (Acolyte) |
on Feb 07, 2008 at 17:32 UTC ( [id://666823]=perlquestion: print w/replies, xml ) | Need Help?? |
Flubb has asked for the wisdom of the Perl Monks concerning the following question:
Hullo,
I have the following script with bits snipped out: It's supposed to open up an html file and insert the $line after the point referenced above. Instead of inserting $line after it (as it should) it writes $line at the bottom of the file *after* everything else. I tried with a simple text file, and it inserted my ersatz text line with ease, but as soon as I insert html, it starts adding it to the end of the file. I know it finds the line because of the "Whee found it" message. Whenever I open up the html file in an editor, it asks if I want to convert the html file to a dos file. (I also end up with some funky ^M characters under Vim.) So the questions are: 1.Is there something fundamentally different between html and txt files that I should know about here? 2. Have I made another noob mistake somewhere I can't see? 3. Is it likely that my join command is throwing in problems? Thanks for your time :E
Back to
Seekers of Perl Wisdom
|
|