in reply to -z file test operator

As far as I can see you're not testing the real filename: put it into quotes and use the full name:
if (-z "BADSYMS.OUT") { system("rm BADSYMS.OUT"); } else { print "Bad symbols..."; }

Update: Too slow once again, and tomhukins used strict and unlink plus error checking which I should have used, too. Shame on me :)

Regards... Stefan
you begin bashing the string with a +42 regexp of confusion