>>>>> "Shannon" == Shannon Murdoch <[EMAIL PROTECTED]> writes:
Shannon> I'm trying to get a string (held in a variable) to have all
Shannon> it's characters spaced apart by a ' ' space.
Shannon> ie. $input's content changes from '1234' to '1 2 3 4'
Shannon> Is there some way to do this?
There are far too many ways. :)
Here's another that I haven't seen (yet) in this thread:
$input =~ s/(.)(?=.)/$1 /g;
meaning: "Take a char, make sure there's a char following it (by
looking ahead), and if so, insert a space after that char".
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]