I doute that your program can even 100% pass compiler. An old advice many good people have been giving from time to time: PLEASE USE perl -w.
In your case, if you use perl -w, you will see that, Perl actually takes your
sub cleaner($dirty)
as sub prototype, and warns you that there is illegal char in the prototype.
As I mentioned prototype, let's just give a simple example of how to use prototype. In the following example, if you uncomment the third call to greeting, you will get an error. Yes, the Perl prototype check is working, and it gives you an error "too many arguments".
use strict;
sub greeting($);
greeting("Merry Christmas");
greeting("Happy New Year");
#greeting("Merry Christtmas", "and Happy new Year");
sub greeting($) {
print "I say, \"", shift, "!\"\n";
}