Hi,
you may want to take a look at tr// (`translate'), especially the `s' modifier. This will replace multiple duplicated characters with one instance of the required character.
For example, in your line
$_=~s/ +/\t/s;,
(the $_ isn't really necessary here) you could have
tr/ /\t/s;. I understand it's quite a bit more efficient.
In reply to Re: Re: Re: whitespaces replace with tabs - help needed...
by hagen
in thread whitespaces replace with tabs - help needed...
by star7
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |