Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Deleting corrupted perl files - modifying the perl runtimeby kylespitz (Initiate) |
on Jul 28, 2008 at 22:01 UTC ( [id://700680]=perlquestion: print w/replies, xml ) | Need Help?? |
kylespitz has asked for the wisdom of the Perl Monks concerning the following question: Hi! I have a challenge for all you perl monks. Let's assume I have thousands of corrupted perl files, like so: Good file: Corrupt file: except that they are each hundreds of lines long and I have some that work and many more that don't. I don't care about salvaging the broken files, all I'm trying to do (ha) is modify the perl compiler so that it deletes or lists any file that is broken. If I have a list, then I can use a script to delete the files. If the compiler can delete the file itself then that is fine too. Also, (here's the fun part) if the file isn't broken then I would like the script to run. I'm asking you monks here because although I've tried to modify the compiler (I replaced a line that printed an error message with a delete command), there are so many errors that perl checks for and tries to fix on its own (one of the many things I love about perl) that I can't find and replace every instance within the compiler (/usr/bin/perl). Any ideas? Thanks in advance for any docs you might point me to or tips on modifying the compiler itself.
Back to
Seekers of Perl Wisdom
|
|