PERL - changing tabs to spaces
by David Moninger <David.Moninger(at)IslandTime.com>
||Thu, 17 Feb 2000 13:47:05 -0500
I'm definitely not a Perl wizard, and I'm sure what I'm trying to do is
incredably simple, but I've run of things to try!
I have a variable $message which contains a very long text string, with
many tabs, each occurance of which I would like to replace with 8 spaces.
Would someone please share the proper code to replace a TAB (/t) with 8
spaces (/s/s/s/s/s/s/s/s) when found in a variable called $message.
$tabstop = 8;
with expand ... that didn't seem to work,
& I tried
(after putting $message into $_ )
but that didn't seem to work.
I'm guessing I've just got bad syntax ...
Thanks in advance for any assistance folks can provide.
HWG: hwg-languages mailing list archives,
maintained by Webmasters @ IWA