Think about Loose Coupling | |
PerlMonks |
Re: Moving a .html fileby GrandFather (Saint) |
on Feb 25, 2012 at 03:58 UTC ( [id://956050]=note: print w/replies, xml ) | Need Help?? |
oko1 has suggested the most likely reason your script is failing, however you'd get to that answer a lot quicker if you added some basic sanity checking to your script. For example your open would be better as:
Note the use of a lexical file handle, three parameter open, reporting of failure of the open (using the "or die" - that's the most important part) and a simple create ('>') instead of the original append which probably doesn't do what you want according to your description. Actually there is a lot in that code that could be improved. Consider:
Oh, in case it's not obvious I've not tested this code. ;)
True laziness is hard work
In Section
Seekers of Perl Wisdom
|
|