In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Shannon Murdoch) wrote:
> Brian's
*ahem* - brian.
> print join ' ', split //, $input;
>
> doesn't actually change $input's content however.
if that is what you wanted then you just need to fill in the
details:
$input = join ' ',
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Shannon Murdoch) wrote:
> > $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?
start from the right and work your way left. ;)
--
brian d foy <[E
> "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?
Ther
's
print join ' ', split //, $input;
doesn't actually change $input's content however.
> From: [EMAIL PROTECTED] (Bob Showalter)
> Newsgroups: perl.beginners.cgi
> Date: Tue, 2 Oct 2001 09:06:01 -0400
> To: "'[EMAIL PROTECTED]'" <[EMAIL
t;
Sent: Tuesday, October 02, 2001 9:06 PM
Subject: RE: $variable manipulation question
> > -Original Message-
> > From: Shannon Murdoch [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, October 02, 2001 6:51 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: $variable m
> -Original Message-
> From: Shannon Murdoch [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, October 02, 2001 6:51 AM
> To: [EMAIL PROTECTED]
> Subject: Re: $variable manipulation question
>
>
> I found a solution not long after using a loop of sorts. (and
>
If you are sure its a string, maybe you can use 'unpack', and then 'join'.
- Roger -
- Original Message -
From: "Shannon Murdoch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 02, 2001 11:20 AM
Subject: $variable manipulat
Shannon Murdoch wrote:
>
> > $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?
perldoc -f join
perldoc -f split
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAI
: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 ap
; Organization: My Angel.com
>> Newsgroups: perl.beginners.cgi
>> Date: Tue, 2 Oct 2001 18:54:51 +0800
>> To: <[EMAIL PROTECTED]>, "Shannon Murdoch"
>> <[EMAIL PROTECTED]>
>> Subject: Re: $variable manipulation question
>>
>> Thats
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 <[EMA
Thats Great !
Yes this is infact helped me.
I was trying it in a much complicated way.
regards
Rajeev Rumale
- Original Message -
From: "Shannon Murdoch" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 02, 2001 6:50 PM
Subject: Re: $variable
I found a solution not long after using a loop of sorts. (and killed two
birds with one stone, as my next step was to put each item (space delimited)
into an array).
I made a loop saying, 'as long as $input still has characters in it, put
each one (one at a time) into the @front_chars array, then
Hi all,
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'
Is there some way to do this?
cheers,
-Shannon
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mai
14 matches
Mail list logo