Hi! I have a challenge for all you perl monks.
Let's assume I have thousands of corrupted perl files, like so:
Good file:
print "hello world!\n";
Corrupt file:
pr;int "hello world!\n";
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.
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |