grinder already mentioned a number of issues, but there are more:
- Use of numbered scalars instead of arrays makes for very repetitive code.
- Speaking of repetition, why are %slash and %decimal built by hand?!?
- None of your variables are scoped. Adding use strict; will show those errors.
- The code in the BEGIN block doesn't belong in a BEGIN block.
- Meet join, the converse of split.
- Meet $., line counter.
- The use of clear is not only unnecessary, it's not portable.
- $_ =~ s/.../.../g; can be written as s/.../.../g;.