You could cycle through the array and use split() to split each element
by whitespace and then append the result to the @new_array array using
push();



-----Original Message-----
From: chen li [mailto:[EMAIL PROTECTED] 
Sent: Monday, May 08, 2006 12:58 PM
To: beginners@perl.org
Subject: array question

Hi all,

I have an arry like this:

@arry=('AA bb','BB','CC AG')

How do I turn it into new array like this:

@new_array=('AA','bb','BB','CC','AG')

Thanks,

Li



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to