Re: Array to strings?
From: gfs X (booya_at_grandma.com)
Date: 03/24/05
- Previous message: pingu: "Re: Array to strings?"
- In reply to: pingu: "Re: Array to strings?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 24 Mar 2005 01:34:17 GMT
On 2005-03-23 05:44:28 -0500, pingu <pingu@work.bcol.be> said:
> gfs X wrote:
>> Hi, Im a complete noob to perl.
>> Is there a way to convert array values into a string?
>>
>> For example
>>
>> @myarr=("Sample","test","Array");
>> My desired output: "SampletestArray"
>> To then work with as a string.
>>
>> I know I could just specify piece by piece but thats just too much and
>> very impractical (im using it to generate filenames)
>>
>> Much thanks in advance
>>
> see
>
> perldoc perlfunc
> look for 'join'
>
> $string = join('',@myarr)
>
> FYI: this newsgroup is defunct. Try comp.lang.perl.misc in the future
> for general Perl questions.
Pingu, that worked perfectly, Thanks a lot! Ill be sure to move to the
other group if i have another question.
- Previous message: pingu: "Re: Array to strings?"
- In reply to: pingu: "Re: Array to strings?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|