in reply to How to Clean up the Junks!!!

The only universal way of removing all the junk would be something like:

$txt =~ s/.//g;

It does, however, have the unfortunate side effect of removing other data as well.

On a more serious note: What's junk for you might be important data for someone else. So it's impossible to have a universal way of removing junk unless there's a universal consensus on what constitutes junk. If you could specify what bits you consider junk, and which bits you consider useful, it would be a start.

...roboticus

When your only tool is a hammer, all problems look like your thumb.