On Feb 20, 2004, at 2:31 PM, Jacob Chapa wrote:

Is there any way to split up a string and put it into an array....

You bet.


something like this:

if I had a string:

one two three four

my @words = split ' ', 'one two three four'; # splits on whitespace


or

one;two;three;four

my @words = split /;/, 'one two three four'; # splits on given pattern


Hope that helps.

James


-- 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