$data contains tabs, leading spaces and multiple spaces, i wish to replace all tabs with a space. multiple spaces with one single space, and remove leading spaces.
in fact somthing that would turn
Input data:
[ asdf asdf asdf asdf ]
Into output data:
[asdf asdf asdf asdf]
How do i do this?