http://www.perlmonks.org?node_id=941748


in reply to Can't Write to Files properly

Where to start?

Well, the first red flag is that you comment out use strict; towards the top of your script...

Scrolling down to the bottom, your last three subs try to use a non-existent global @LINE array, a problem which of course strictures would have identified.

My advice: go to bed, get a good night's sleep (and try not to dream of Perl...) :)

And tomorrow, after uncommenting use strict; and adding use warnings;, work through your code until you've fixed all the errors thereby revealed.

Then, if it still doesn't work, remove everything from your test code that has no relevance to the problem at hand (particularly, but not exclusively, the 170+ lines in sub MakeHTML), after which we might be willing to debug any remaining errors.