Re: $variable manipulation question

2001-10-02 Thread _brian_d_foy
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 ' ',

Re: $variable manipulation question

2001-10-02 Thread _brian_d_foy
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

Re: $variable manipulation question

2001-10-02 Thread Randal L. Schwartz
> "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

Re: $variable manipulation question

2001-10-02 Thread Shannon Murdoch
'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

Re: $variable manipulation question

2001-10-02 Thread Rajeev Rumale
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

RE: $variable manipulation question

2001-10-02 Thread Bob Showalter
> -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 >

Re: $variable manipulation question

2001-10-02 Thread Roger C Haslock
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

Re: $variable manipulation question

2001-10-02 Thread fliptop
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

Re: $variable manipulation question

2001-10-02 Thread Shannon Murdoch
: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

Re: $variable manipulation question

2001-10-02 Thread Shannon Murdoch
; 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

Re: $variable manipulation question

2001-10-02 Thread _brian_d_foy
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

Re: $variable manipulation question

2001-10-02 Thread Rajeev Rumale
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

Re: $variable manipulation question

2001-10-02 Thread Shannon Murdoch
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

$variable manipulation question

2001-10-02 Thread Shannon Murdoch
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