> $x = join ' ', split //, $x;

That looks like a very compact way of doing it, Brian- is it possible to get
a bit of a rundown of how it works?

cheers,
-Shannon

> From: [EMAIL PROTECTED] (_brian_d_foy)
> Newsgroups: perl.beginners.cgi
> Date: Tue, 02 Oct 2001 06:56:59 -0400
> To: [EMAIL PROTECTED]
> Subject: Re: $variable manipulation question
> 
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] (Shannon Murdoch) wrote:
> 
>> I'm trying to get a string (held in a variable) to have all it's characters
>> spaced apart by a ' ' space.
>> 
>> ie.   $input's content changes from '1234' to '1 2 3 4'
> 
> $x = join ' ', split //, $x;
> -- 
> brian d foy <[EMAIL PROTECTED]> - Perl services for hire
> CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
> Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to