From: Jacob Chapa <[EMAIL PROTECTED]>
> Is there any way to split up a string and put it into an array....
> 
> something like this:
> 
> if I had a string:
> 
> one two three four
> 
> or
> 
> one;two;three;four
> 
> Can I put "one" into the first element, "two" into the second, etc...
> knowing what splits up the string. For instance, in the first one a
> space " " separates it and in the second a semicolon ";" separates the
> elements.

Guess what ... 

        @array = split / /, "one two three four";
        @array2 = split /;/, "one;two;three;four";

;-)

Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


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